Documentation ¶
Index ¶
- Constants
- func GetNameInfoFromX509Cert(cert *x509.Certificate) string
- func GetPublicKeyFromCertificate(certPemBytes []byte) ([]byte, error)
- func LoadCertificate(certPath string) (*x509.Certificate, error)
- func LoadCertificateChain(certChainPath string) ([]*x509.Certificate, error)
- func PEMDecode(pemBytes []byte, mode string) []byte
- func VerifyBlob(msgBytes, sigBytes, certBytes []byte, caCertPathString *string) (bool, string, *int64, error)
Constants ¶
View Source
const ( PEMTypePrivateKey string = "RSA PRIVATE KEY" PEMTypePublicKey string = "PUBLIC KEY" PEMTypeCertificate string = "CERTIFICATE" )
Variables ¶
This section is empty.
Functions ¶
func GetNameInfoFromX509Cert ¶
func GetNameInfoFromX509Cert(cert *x509.Certificate) string
get signer name info from cert try finding it in the following order - cert.EmailAddress - cert.Subject.Names[] - cert.Subject.CommonName - SubjectAlternativeName (SAN) in cert.Extensions[]
func GetPublicKeyFromCertificate ¶
extract public key of certificate
func LoadCertificate ¶
func LoadCertificate(certPath string) (*x509.Certificate, error)
Load certificate at `certPath` Specifying a cert secret with `k8s://` prefix is supported.
func LoadCertificateChain ¶ added in v0.4.0
func LoadCertificateChain(certChainPath string) ([]*x509.Certificate, error)
Load certificate chain at `certChainPath` Specifying a cert secret with `k8s://` prefix is supported.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.