Documentation ¶
Index ¶
- func GetCertificateFromBytes(certBytes []byte) (*x509.Certificate, error)
- func GetCertificateWithPrivateKeyFromBytes(certBytes, keyBytes []byte) (*x509.Certificate, *rsa.PrivateKey, error)
- func GetPrivateKeyFromBytes(keyBytes []byte) (*rsa.PrivateKey, error)
- func ValidateCertificate(cert *x509.Certificate, key *rsa.PrivateKey, expirationThreshold time.Duration) error
- type CA
- type CaExpiredError
- type CaNotYetValidError
- type CapsuleCA
- type CertificateOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCertificateFromBytes ¶
func GetCertificateFromBytes(certBytes []byte) (*x509.Certificate, error)
func GetCertificateWithPrivateKeyFromBytes ¶
func GetCertificateWithPrivateKeyFromBytes(certBytes, keyBytes []byte) (*x509.Certificate, *rsa.PrivateKey, error)
func GetPrivateKeyFromBytes ¶
func GetPrivateKeyFromBytes(keyBytes []byte) (*rsa.PrivateKey, error)
func ValidateCertificate ¶
func ValidateCertificate(cert *x509.Certificate, key *rsa.PrivateKey, expirationThreshold time.Duration) error
Types ¶
type CA ¶
type CA interface { GenerateCertificate(opts CertificateOptions) (certificatePem *bytes.Buffer, certificateKey *bytes.Buffer, err error) CACertificatePem() (b *bytes.Buffer, err error) CAPrivateKeyPem() (b *bytes.Buffer, err error) ExpiresIn(now time.Time) (time.Duration, error) ValidateCert(certificate *x509.Certificate) error }
type CaExpiredError ¶
type CaExpiredError struct{}
func (CaExpiredError) Error ¶
func (CaExpiredError) Error() string
type CaNotYetValidError ¶
type CaNotYetValidError struct{}
func (CaNotYetValidError) Error ¶
func (CaNotYetValidError) Error() string
type CapsuleCA ¶
type CapsuleCA struct {
// contains filtered or unexported fields
}
func (CapsuleCA) CACertificatePem ¶
func (CapsuleCA) CAPrivateKeyPem ¶
func (*CapsuleCA) GenerateCertificate ¶
type CertificateOptions ¶
func NewCertOpts ¶
func NewCertOpts(expirationDate time.Time, dnsNames ...string) CertificateOptions
Click to show internal directories.
Click to hide internal directories.