utils

package
v0.7.8 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2022 License: Apache-2.0 Imports: 11 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{}) ([]byte, error)

func GenerateCertificateTemplate added in v0.7.8

func GenerateCertificateTemplate(subject pkix.Name, isCA bool) *x509.Certificate

func GenerateRSAKey

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

func GetExpiryOfPEMCertificate

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

func GetSubjectFromCSR added in v0.7.8

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 SignCertificate

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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