Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseCertificatesPEM ¶
func ParseCertificatesPEM(data []byte) ([]*x509.Certificate, error)
ParseCertificatesPEM parses all CERTIFICATE blocks in a PEM bundle.
Types ¶
type Identity ¶
type Identity struct {
Signer crypto.Signer
Certificate *x509.Certificate
Chain []*x509.Certificate
}
Identity binds a private-key signer to its leaf certificate and optional certificate chain. Signer may be backed by software, a smart card, an HSM, or a cloud KMS as long as it implements crypto.Signer.
func NewIdentity ¶
func NewIdentity(signer crypto.Signer, certificate *x509.Certificate, chain ...*x509.Certificate) (*Identity, error)
NewIdentity validates and returns a certificate-backed signer identity.
func NewIdentityPEM ¶
NewIdentityPEM parses a PEM certificate bundle and a PEM private key. PKCS#1 RSA, SEC1 EC, and unencrypted PKCS#8 keys are supported. Legacy PEM encryption is supported when password is supplied.
func (*Identity) CertificateChainDER ¶
CertificateChainDER returns the leaf certificate followed by its chain.
Click to show internal directories.
Click to hide internal directories.