Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultExpiry = 365 * 24 * time.Hour
Variables ¶
This section is empty.
Functions ¶
func NewCertPoolFromCA ¶
func NewCertPoolFromCA(ca *x509.Certificate) *x509.CertPool
Types ¶
type CertificateKeyPair ¶
type CertificateKeyPair struct { PrivateKeyPem []byte CertificatePem []byte Certificate *x509.Certificate PrivateKey ed25519.PrivateKey }
func GenerateCA ¶
func GenerateCA(config *CAConfig) (*CertificateKeyPair, error)
func (*CertificateKeyPair) CreateCertificate ¶
func (c *CertificateKeyPair) CreateCertificate(hostName string, expiry time.Duration) (*CertificateKeyPair, error)
type PEMBlockType ¶
type PEMBlockType string
const ( CertificateBlock PEMBlockType = "CERTIFICATE" PrivateKeyBlock PEMBlockType = "PRIVATE KEY" )
Click to show internal directories.
Click to hide internal directories.