Documentation
¶
Index ¶
Constants ¶
View Source
const ( TlsKeyName = "tls.key" TLsCertName = "tls.crt" )
Variables ¶
View Source
var ( // SerialNumberLimit is the maximum number used as a certificate serial number SerialNumberLimit = new(big.Int).Lsh(big.NewInt(1), 128) DefaultExpireTimeout = 365 * 24 * time.Hour UpdateCABefore = 10 * time.Minute )
View Source
var ( Cert_Type = "CERTIFICATE" PrivateKey_Type = "RSA PRIVATE KEY" )
Functions ¶
Types ¶
type CA ¶
type CA struct { //the struct of privateKey. PrivateKey *rsa.PrivateKey // the certificate used to issue new certificates Certificate *x509.Certificate // contains filtered or unexported fields }
func BuildCAFromSecret ¶
build from secret, the secret keys should contains tls.key, tls.
func NewCAConfigSecret ¶
create CA according to the options.
func (*CA) GetEncodeCert ¶
return the encode signed certificate.
func (*CA) GetEncodePrivateKey ¶
return the encode signed key.
Click to show internal directories.
Click to hide internal directories.