Documentation ¶
Index ¶
- func Blocks2Certs(blocks []*pem.Block) ([]*x509.Certificate, error)
- func ParseCsr(csrPem []byte) (*x509.CertificateRequest, error)
- func PemChain2Blocks(pemBuff string) ([]*pem.Block, 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)
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 interface{}) *ClientSigner
func (*ClientSigner) Sign ¶
func (s *ClientSigner) Sign(csrPem []byte, opts *SigningOpts) ([]byte, error)
func (*ClientSigner) SigningCertPEM ¶
func (s *ClientSigner) SigningCertPEM() string
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 interface{}) *ServerSigner
func (*ServerSigner) Sign ¶
func (s *ServerSigner) Sign(csrPem []byte, opts *SigningOpts) ([]byte, error)
func (*ServerSigner) SigningCertPEM ¶
func (s *ServerSigner) SigningCertPEM() string
Click to show internal directories.
Click to hide internal directories.