issuer

package
v0.6.16 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCSR

func GenerateCSR(name pkix.Name, privateKey interface{}) (csrDerBytes []byte, err error)

func GenerateCertificateUsingX509Subject added in v0.5.5

func GenerateCertificateUsingX509Subject(subject pkix.Name) (certificate []byte, key []byte, expiryString string, err error)

func GenerateCertificateUsingX509SubjectOptionalValues added in v0.5.5

func GenerateCertificateUsingX509SubjectOptionalValues(commonName string, o, ou, l, p, c *string,
	subCACert *x509.Certificate, casubCAKeyCert *rsa.PrivateKey) (certificate []byte, key []byte, expiryString string, err error)

func GenerateHSMSignedCertificate added in v0.6.8

func GenerateHSMSignedCertificate(unsignedCertificate *x509.Certificate, signerName string, parent *x509.Certificate, parentSignerName string) (*x509.Certificate, []byte, string, error)

func GenerateHSMSignedCertificateWithPrivateKey added in v0.6.8

func GenerateHSMSignedCertificateWithPrivateKey(unsignedCertificate *x509.Certificate, parent *x509.Certificate, parentSignerName string) (*x509.Certificate, []byte, *rsa.PrivateKey, error)

func GeneratePemCertificate

func GeneratePemCertificate(subject pkix.Name, possiblyUseHSM bool) (pemCertificate []byte, pemPrivateKey []byte, expiryString string, err error)

GeneratePemCertificate generates a PEM certificate using a CSR

func GenerateRSAKey

func GenerateRSAKey() (privateKey *rsa.PrivateKey, err error)

func GenerateSelfSignedRootCACertAndKey

func GenerateSelfSignedRootCACertAndKey() (err error)

GenerateSelfSignedRootCACertAndKey generates the root certificate

func GenerateSelfSignedSubCACertAndKey

func GenerateSelfSignedSubCACertAndKey() (err error)

GenerateSelfSignedSubCACertAndKey generates the sub CA certificate

func GenerateSignedCertificate added in v0.6.8

func GenerateSignedCertificate(unsignedCertificate *x509.Certificate, parent *x509.Certificate, parentPrivateKey *rsa.PrivateKey) (*x509.Certificate, []byte, *rsa.PrivateKey, error)

func GetExpiryOfPEMCertificate added in v0.5.7

func GetExpiryOfPEMCertificate(pemCert []byte) (expiry string, err error)

func GetRootCAPEMCert added in v0.6.8

func GetRootCAPEMCert() []byte

func GetSubCAPEMCert added in v0.6.8

func GetSubCAPEMCert() []byte

func GetSubjectFromCSR

func GetSubjectFromCSR(csr string) (subject *pkix.Name, err error)

GetSubjectFromCSR get the subject from CSR

func PemToCert

func PemToCert(pemCert []byte) (cert *x509.Certificate, err error)

func PemToRSAPrivateKey

func PemToRSAPrivateKey(pemKey []byte) (rsaKey *rsa.PrivateKey, err error)

func SetRootCA added in v0.6.8

func SetRootCA(rootCert *x509.Certificate, pemRootCACert []byte, rsaRootKey *rsa.PrivateKey)

func SetSubCA added in v0.6.8

func SetSubCA(rootCert *x509.Certificate, pemRootCACert []byte, rsaRootKey *rsa.PrivateKey)

Types

This section is empty.

Jump to

Keyboard shortcuts

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