subca

package
v0.7.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCertificateUsingX509Subject

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

func GenerateCertificateUsingX509SubjectOptionalValues

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

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

func GenerateHSMSignedCertificateWithPrivateKey

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 GenerateSelfSignedRootCACertAndKey

func GenerateSelfSignedRootCACertAndKey() (err error)

GenerateSelfSignedRootCACertAndKey generates the root certificate

func GenerateSelfSignedSubCACertAndKey

func GenerateSelfSignedSubCACertAndKey() (err error)

GenerateSelfSignedSubCACertAndKey generates the sub CA certificate

func GetRootCAPEMCert

func GetRootCAPEMCert() []byte

func GetSubCAPEMCert

func GetSubCAPEMCert() []byte

func GetSubjectFromCSR

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

GetSubjectFromCSR get the subject from CSR

func SetRootCA

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

func SetSubCA

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

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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