cert

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Utility for key and cert file

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatPrivateKey

func FormatPrivateKey(privateKey string) (pKey string)

FormatPrivateKey convert private key string to cert file text pattern

func FormatPublicKey

func FormatPublicKey(publicKey string) (pKey string)

FormatPublicKey convert public key string to cert file text pattern

func LoadCertSN

func LoadCertSN(certPathOrData interface{}) (sn string, err error)

LoadCertSN load root cert sn form path or bytes

func LoadPrivateKeyFormBytes

func LoadPrivateKeyFormBytes(privateKeyType string, input []byte) sign.LoadPrivateKeyFunc

LoadPrivateKeyFormBytes load private key form byte

func LoadPrivateKeyFormString

func LoadPrivateKeyFormString(privateKeyType string, privateKey string) sign.LoadPrivateKeyFunc

LoadPrivateKeyFormString load private key form string

by default key type is PKCS8, sign type is SHA256

func LoadPublicCertFormBytes

func LoadPublicCertFormBytes(input []byte) (publicKey *rsa.PublicKey, err error)

LoadPublicCertFormBytes load public cert form byte

func LoadPublicKeyFormBytes

func LoadPublicKeyFormBytes(input []byte) (publicKey *rsa.PublicKey, err error)

LoadPublicKeyFormBytes load public key form byte

func LoadRootCertSN

func LoadRootCertSN(rootCertPathOrData interface{}) (sn string, err error)

LoadRootCertSN load root cert sn form path or bytes

func PublicCertFormBytes

func PublicCertFormBytes(input []byte) sign.LoadPublicKeyFunc

PublicCertFormBytes load public key form byte

func PublicCertFormPath

func PublicCertFormPath(input string) sign.LoadPublicKeyFunc

PublicCertFormPath load public key form path

func PublicKeyFormString

func PublicKeyFormString(input string) sign.LoadPublicKeyFunc

PublicKeyFormString load public key form string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL