certs

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2021 License: Apache-2.0 Imports: 12 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 GeneratePemCertificate

func GeneratePemCertificate(subject pkix.Name, parentCert *x509.Certificate, parentKey *rsa.PrivateKey) (pemCertificate []byte, pemPrivateKey []byte, err error)

GeneratePemCertificate generates a PEM certificate using a CSR

func GenerateRSAKey

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

func GenerateSelfSignedRootCACertAndKey

func GenerateSelfSignedRootCACertAndKey() (certificate *x509.Certificate, pemCACert []byte, rsaRootKey *rsa.PrivateKey, err error)

GenerateSelfSignedRootCACertAndKey generates the root certificate

func GenerateSelfSignedSubCACertAndKey

func GenerateSelfSignedSubCACertAndKey(parentCert *x509.Certificate, parentKey *rsa.PrivateKey) (certificate *x509.Certificate, pemSubCert []byte, rsasubCAKey *rsa.PrivateKey, err error)

GenerateSelfSignedSubCACertAndKey generates the sub CA certificate

func GenerateTLSClientCert

func GenerateTLSClientCert(server string, parentCert *x509.Certificate, parentKey *rsa.PrivateKey, certfilename string, keyfilename string) (*tls.Certificate, error)

func GenerateTLSServerCert

func GenerateTLSServerCert(server string, parentCert *x509.Certificate, parentKey *rsa.PrivateKey) (*tls.Certificate, error)

func GetSubjectFromCSR

func GetSubjectFromCSR(csr string) (subject pkix.Name)

GetSubjectFromCSR get the subject from CSR

func LoadCAServerCert

func LoadCAServerCert(filename string) (*x509.CertPool, error)

func PemToCert

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

func PemToRSAPrivateKey

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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