Documentation ¶
Index ¶
- func GenerateCSR(name pkix.Name, privateKey interface{}) (csrDerBytes []byte, err error)
- func GeneratePemCertificate(subject pkix.Name, parentCert *x509.Certificate, parentKey *rsa.PrivateKey) (pemCertificate []byte, pemPrivateKey []byte, err error)
- func GenerateRSAKey() (privateKey *rsa.PrivateKey, err error)
- func GenerateSelfSignedRootCACertAndKey() (certificate *x509.Certificate, pemCACert []byte, rsaRootKey *rsa.PrivateKey, ...)
- func GenerateSelfSignedSubCACertAndKey(parentCert *x509.Certificate, parentKey *rsa.PrivateKey) (certificate *x509.Certificate, pemSubCert []byte, rsasubCAKey *rsa.PrivateKey, ...)
- func GenerateTLSClientCert(server string, parentCert *x509.Certificate, parentKey *rsa.PrivateKey, ...) (*tls.Certificate, error)
- func GenerateTLSServerCert(server string, parentCert *x509.Certificate, parentKey *rsa.PrivateKey) (*tls.Certificate, error)
- func GetSubjectFromCSR(csr string) (subject pkix.Name)
- func LoadCAServerCert(filename string) (*x509.CertPool, error)
- func PemToCert(pemCert []byte) (cert *x509.Certificate, err error)
- func PemToRSAPrivateKey(pemKey []byte) (rsaKey *rsa.PrivateKey, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateCSR ¶
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 ¶
GetSubjectFromCSR get the subject from CSR
func PemToRSAPrivateKey ¶
func PemToRSAPrivateKey(pemKey []byte) (rsaKey *rsa.PrivateKey, err error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.