Documentation
¶
Index ¶
- func GetCertificateSerialNumber(certificate x509.Certificate) string
- func IsCertificateExpired(certificate x509.Certificate, now time.Time) bool
- func IsCertificateValid(certificate x509.Certificate, now time.Time) bool
- func LoadCertificate(certificateStr string) (certificate *x509.Certificate, err error)
- func LoadCertificateWithPath(path string) (certificate *x509.Certificate, err error)
- func LoadPrivateKey(privateKeyStr string) (privateKey *rsa.PrivateKey, err error)
- func LoadPrivateKeyWithPath(path string) (privateKey *rsa.PrivateKey, err error)
- func LoadPublicKey(publicKeyStr string) (publicKey *rsa.PublicKey, err error)
- func LoadPublicKeyWithPath(path string) (publicKey *rsa.PublicKey, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCertificateSerialNumber ¶
func GetCertificateSerialNumber(certificate x509.Certificate) string
GetCertificateSerialNumber retrieves the serial number from a certificate.
func IsCertificateExpired ¶
func IsCertificateExpired(certificate x509.Certificate, now time.Time) bool
IsCertificateExpired checks if the certificate is expired at a specific time.
func IsCertificateValid ¶
func IsCertificateValid(certificate x509.Certificate, now time.Time) bool
IsCertificateValid checks if the certificate is valid at a specific time.
func LoadCertificate ¶
func LoadCertificate(certificateStr string) (certificate *x509.Certificate, err error)
LoadCertificate loads a certificate from its textual content.
func LoadCertificateWithPath ¶
func LoadCertificateWithPath(path string) (certificate *x509.Certificate, err error)
LoadCertificateWithPath loads a certificate from a file path.
func LoadPrivateKey ¶
func LoadPrivateKey(privateKeyStr string) (privateKey *rsa.PrivateKey, err error)
LoadPrivateKey loads a private key from its textual content.
func LoadPrivateKeyWithPath ¶
func LoadPrivateKeyWithPath(path string) (privateKey *rsa.PrivateKey, err error)
LoadPrivateKeyWithPath loads a private key from a file path.
func LoadPublicKey ¶
LoadPublicKey loads a public key from its textual text content.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.