utils

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 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{}) (csrDerBytes []byte, err error)

func GenerateRSAKey

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

func GenerateSelfSignedSigningCertificate

func GenerateSelfSignedSigningCertificate(cn string) (*x509.Certificate, []byte, *rsa.PrivateKey, error)

func GenerateSignedCertificate

func GenerateSignedCertificate(cn string, signingCert *x509.Certificate, signingKey *rsa.PrivateKey) (*x509.Certificate, []byte, *rsa.PrivateKey, []byte, error)

func GenerateX509ertificate

func GenerateX509ertificate(subject pkix.Name, keyUsage x509.KeyUsage, isCA bool) (*x509.Certificate, string)

func GetExpiryOfPEMCertificate

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

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, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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