Documentation ¶
Index ¶
- func Blocks2Certs(blocks []*pem.Block) ([]*x509.Certificate, error)
- func ParseCsrPem(csrPem []byte) (*x509.CertificateRequest, error)
- func PemChain2Blocks(pemBuff string) ([]*pem.Block, error)
- func RawToPem(raw []byte) ([]byte, error)
- type CertPem
- type ClientSigner
- type DefaultSerialGenerator
- type FingerprintGenerator
- type Fingerprints
- type SerialGenerator
- type ServerSigner
- type SignFunc
- type Signer
- type SigningOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Blocks2Certs ¶
func Blocks2Certs(blocks []*pem.Block) ([]*x509.Certificate, error)
func ParseCsrPem ¶
func ParseCsrPem(csrPem []byte) (*x509.CertificateRequest, error)
Types ¶
type CertPem ¶
type CertPem struct { Cert *x509.Certificate Pem []byte }
type ClientSigner ¶
type ClientSigner struct { SerialGenerator SerialGenerator // contains filtered or unexported fields }
func NewClientSigner ¶
func NewClientSigner(caCert *x509.Certificate, caKey crypto.PrivateKey) *ClientSigner
func (*ClientSigner) Cert ¶
func (s *ClientSigner) Cert() *x509.Certificate
func (*ClientSigner) SignCsr ¶
func (s *ClientSigner) SignCsr(csr *x509.CertificateRequest, opts *SigningOpts) ([]byte, error)
func (*ClientSigner) Signer ¶
func (s *ClientSigner) Signer() crypto.Signer
func (*ClientSigner) SigningCert ¶
func (s *ClientSigner) SigningCert() *x509.Certificate
type DefaultSerialGenerator ¶
type DefaultSerialGenerator struct{}
func (DefaultSerialGenerator) Generate ¶
func (DefaultSerialGenerator) Generate() *big.Int
type FingerprintGenerator ¶
type FingerprintGenerator interface { FromCert(cert *x509.Certificate) string FromCerts(certs []*x509.Certificate) Fingerprints FromRaw(raw []byte) string FromPem(pem []byte) string }
func NewFingerprintGenerator ¶
func NewFingerprintGenerator() FingerprintGenerator
type Fingerprints ¶
type Fingerprints map[string]*x509.Certificate
func (Fingerprints) Contains ¶
func (fingerprints Fingerprints) Contains(fp string) bool
func (Fingerprints) Prints ¶
func (fingerprints Fingerprints) Prints() []string
type SerialGenerator ¶
type ServerSigner ¶
type ServerSigner struct { SerialGenerator SerialGenerator // contains filtered or unexported fields }
func NewServerSigner ¶
func NewServerSigner(caCert *x509.Certificate, caKey crypto.PrivateKey) *ServerSigner
func (*ServerSigner) Cert ¶
func (s *ServerSigner) Cert() *x509.Certificate
func (*ServerSigner) SignCsr ¶
func (s *ServerSigner) SignCsr(csr *x509.CertificateRequest, opts *SigningOpts) ([]byte, error)
func (*ServerSigner) Signer ¶
func (s *ServerSigner) Signer() crypto.Signer
func (*ServerSigner) SigningCert ¶
func (s *ServerSigner) SigningCert() *x509.Certificate
type Signer ¶
type Signer interface { SignCsr(*x509.CertificateRequest, *SigningOpts) ([]byte, error) SigningCert() *x509.Certificate Cert() *x509.Certificate Signer() crypto.Signer }
Click to show internal directories.
Click to hide internal directories.