Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Active ¶
func Active(cert *x509.Certificate) bool
Active checks if the given cert is within its valid time window
func PEMToCert ¶
func PEMToCert(certPEM []byte) (*x509.Certificate, error)
PEMToCert converts the PEM block of the given byte array to an x509 certificate
func VerifyCert ¶
func VerifyCert(ca, cert *x509.Certificate, host string) error
VerifyCert checks that the given cert is signed and trusted by the given CA
Types ¶
type CertGenerator ¶ added in v0.18.0
type CertGeneratorFunc ¶ added in v0.18.0
type KeyPair ¶
type KeyPair struct { Cert *x509.Certificate Priv *ecdsa.PrivateKey }
KeyPair stores an x509 certificate and its ECDSA private key
func CreateSignedServingPair ¶
func CreateSignedServingPair(notAfter time.Time, organization string, ca *KeyPair, hosts []string) (*KeyPair, error)
CreateSignedServingPair creates a serving cert/key pair signed by the given ca
func GenerateCA ¶
GenerateCA generates a self-signed CA cert/key pair that expires in expiresIn days
Click to show internal directories.
Click to hide internal directories.