Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportPemChain ¶
func ExportPemChain(certs []*GenCertOutput, dir, name string) error
ExportPemChain exports a list of certificates to a chain file.
Types ¶
type GenCertInput ¶
type GenCertInput struct { // CommonName is the target's common name. CommonName string // Dir is the directory where to export the target. Dir string // DaysDuration is the target's duration in days. DaysDuration int // Type can be one of root,intermediate or leaf. Type string // IssuerCert is the issuer certificate that is signing the target certificate. IssuerCert *x509.Certificate // IssuerPrivateKey is the issuer private key. IssuerPrivateKey *rsa.PrivateKey }
GenCertInput represent payload required to generate a certificate.
type GenCertOutput ¶
type GenCertOutput struct { // Certificate represents x509 certificate. Certificate *x509.Certificate // PrivateKey is a generated private key. PrivateKey *rsa.PrivateKey // FileName is the certificate's file location on disk. FileName string }
GenCertOutput represent the output after successful certificate generation.
func GenCert ¶
func GenCert(input *GenCertInput) (*GenCertOutput, error)
GenCert generates a certificate file and a private key.
Click to show internal directories.
Click to hide internal directories.