Documentation ¶
Index ¶
- func GetDefKeyRequest() *csr.KeyRequest
- func NewCA(req *csr.CertificateRequest) (cert []byte, csrPEM []byte, key []byte, err error)
- func RenewCACertByCaKeyAndCert(caKeyFile string, caFile string) (cert []byte, err error)
- func RenewCACertByCaKeyAndJson(caKeyFile string, req *csr.CertificateRequest) (cert []byte, csrPEM []byte, key []byte, err error)
- func SignCert(caFile, caKeyFile string, caCfg *config.Config, profile string, ...) (cert []byte, csrPEM []byte, key []byte, err error)
- func SignCertWithBytes(ca, caKey []byte, caPrivateKeyPassword string, caCfg *config.Config, ...) (cert []byte, csrPEM []byte, key []byte, err error)
- func WriteCertCsrFile(filespec, contents string)
- func WriteCertFile(filespec, contents string)
- func WriteCertFileWithMode(filespec, contents string, perms os.FileMode)
- func WriteCertKeyFile(filespec, contents string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenewCACertByCaKeyAndCert ¶
cfssl gencert -renewca -ca cert -ca-key key
func RenewCACertByCaKeyAndJson ¶
func RenewCACertByCaKeyAndJson(caKeyFile string, req *csr.CertificateRequest) (cert []byte, csrPEM []byte, key []byte, err error)
cfssl gencert -initca -ca-key key CsrJSON
func SignCert ¶
func SignCert(caFile, caKeyFile string, caCfg *config.Config, profile string, req *csr.CertificateRequest, CRLOverride string) (cert []byte, csrPEM []byte, key []byte, err error)
cfssl gencert -ca=ca/ca.pem -ca-key=ca/ca-key.pem -config=ca-config.json -profile=server server.json
func SignCertWithBytes ¶
func SignCertWithBytes(ca, caKey []byte, caPrivateKeyPassword string, caCfg *config.Config, profile string, req *csr.CertificateRequest, CRLOverride string) (cert []byte, csrPEM []byte, key []byte, err error)
cfssl gencert -ca=ca/ca.pem -ca-key=ca/ca-key.pem -config=ca-config.json -profile=server server.json
func WriteCertCsrFile ¶
func WriteCertCsrFile(filespec, contents string)
func WriteCertFile ¶
func WriteCertFile(filespec, contents string)
func WriteCertFileWithMode ¶
perms os.FileMode .pem: 0664 .key: 0600 .csr: 0644
func WriteCertKeyFile ¶
func WriteCertKeyFile(filespec, contents string)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.