pem

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

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

func LoadPublicKey(publicKeyStr string) (publicKey *rsa.PublicKey, err error)

LoadPublicKey loads a public key from its textual text content.

func LoadPublicKeyWithPath

func LoadPublicKeyWithPath(path string) (publicKey *rsa.PublicKey, err error)

LoadPublicKeyWithPath load public key

Types

This section is empty.

Jump to

Keyboard shortcuts

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