Documentation ¶
Index ¶
- func GenerateCSR(name pkix.Name, privateKey interface{}) (csrDerBytes []byte, err error)
- func GenerateCertificateUsingX509Subject(subject pkix.Name) (certificate []byte, key []byte, expiryString string, err error)
- func GenerateCertificateUsingX509SubjectOptionalValues(commonName string, o, ou, l, p, c *string, subCACert *x509.Certificate, ...) (certificate []byte, key []byte, expiryString string, err error)
- func GenerateHSMSignedCertificate(unsignedCertificate *x509.Certificate, signerName string, ...) (*x509.Certificate, []byte, string, error)
- func GenerateHSMSignedCertificateWithPrivateKey(unsignedCertificate *x509.Certificate, parent *x509.Certificate, ...) (*x509.Certificate, []byte, *rsa.PrivateKey, error)
- func GeneratePemCertificate(subject pkix.Name, possiblyUseHSM bool) (pemCertificate []byte, pemPrivateKey []byte, expiryString string, err error)
- func GenerateRSAKey() (privateKey *rsa.PrivateKey, err error)
- func GenerateSelfSignedRootCACertAndKey() (err error)
- func GenerateSelfSignedSubCACertAndKey() (err error)
- func GenerateSignedCertificate(unsignedCertificate *x509.Certificate, parent *x509.Certificate, ...) (*x509.Certificate, []byte, *rsa.PrivateKey, error)
- func GetExpiryOfPEMCertificate(pemCert []byte) (expiry string, err error)
- func GetRootCAPEMCert() []byte
- func GetSubCAPEMCert() []byte
- func GetSubjectFromCSR(csr string) (subject *pkix.Name, err error)
- func PemToCert(pemCert []byte) (cert *x509.Certificate, err error)
- func PemToRSAPrivateKey(pemKey []byte) (rsaKey *rsa.PrivateKey, err error)
- func SetRootCA(rootCert *x509.Certificate, pemRootCACert []byte, rsaRootKey *rsa.PrivateKey)
- func SetSubCA(rootCert *x509.Certificate, pemRootCACert []byte, rsaRootKey *rsa.PrivateKey)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateCSR ¶
func GenerateCertificateUsingX509Subject ¶ added in v0.5.5
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 GetRootCAPEMCert ¶ added in v0.6.8
func GetRootCAPEMCert() []byte
func GetSubCAPEMCert ¶ added in v0.6.8
func GetSubCAPEMCert() []byte
func GetSubjectFromCSR ¶
GetSubjectFromCSR get the subject from CSR
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.
Click to show internal directories.
Click to hide internal directories.