cfssl

package
v0.0.22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefKeyRequest

func GetDefKeyRequest() *csr.KeyRequest

equal with csr.NewKeyRequest()

func NewCA

func NewCA(req *csr.CertificateRequest) (cert []byte, csrPEM []byte, key []byte, err error)

cfssl gencert -initca ca-csr.json | cfssljson -bare ca/ca -

func RenewCACertByCaKeyAndCert

func RenewCACertByCaKeyAndCert(caKeyFile string, caFile string) (cert []byte, err error)

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

func WriteCertFileWithMode(filespec, contents string, perms os.FileMode)

perms os.FileMode .pem: 0664 .key: 0600 .csr: 0644

func WriteCertKeyFile

func WriteCertKeyFile(filespec, contents string)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL