Documentation ¶
Index ¶
- Constants
- func CreateCertificate(caName string, parentCertPemBytes, parentPrivateKeyPemBytes []byte) ([]byte, []byte, []byte, error)
- func GenerateKeyPair() (*rsa.PrivateKey, crypto.PublicKey, error)
- func GenerateSignature(msg, prvKeyPemBytes []byte) ([]byte, error)
- func GetPublicKeyFromCertificate(certPemBytes []byte) ([]byte, error)
- func GetSubjectFromCertificate(certPemBytes []byte) (pkix.Name, error)
- func NewSignerInfoFromCert(cert *x509.Certificate) *common.SignerInfo
- func NewSignerInfoFromPKIXName(dn pkix.Name) *common.SignerInfo
- func PEMDecode(pemBytes []byte, mode string) []byte
- func PEMEncode(content []byte, mode string) []byte
- func ParseCertificate(certPemBytes []byte) (*x509.Certificate, error)
- func VerifyCertificate(certPemBytes []byte, certPathList []string) (bool, string, error)
- func VerifySignature(msg, sig, pubKeyBytes []byte) (bool, string, error)
Constants ¶
View Source
const ( PEMTypePrivateKey string = "RSA PRIVATE KEY" PEMTypePublicKey string = "PUBLIC KEY" PEMTypeCertificate string = "CERTIFICATE" )
Variables ¶
This section is empty.
Functions ¶
func CreateCertificate ¶
func GenerateKeyPair ¶
func GenerateKeyPair() (*rsa.PrivateKey, crypto.PublicKey, error)
func GenerateSignature ¶
func NewSignerInfoFromCert ¶
func NewSignerInfoFromCert(cert *x509.Certificate) *common.SignerInfo
func NewSignerInfoFromPKIXName ¶
func NewSignerInfoFromPKIXName(dn pkix.Name) *common.SignerInfo
func ParseCertificate ¶
func ParseCertificate(certPemBytes []byte) (*x509.Certificate, error)
func VerifyCertificate ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.