Documentation ¶
Overview ¶
* * Copyright (c) 2020 Ameya Lokare
Index ¶
- func GenerateCertificate(hostname string, organizationName string, key crypto.PrivateKey, ...) ([]byte, error)
- func GenerateKeyPair() (crypto.PrivateKey, error)
- func GenerateLeafCert(hostname string, organizationName string, issuerCert *x509.Certificate, ...) (*tls.Certificate, error)
- func GenerateRootCACert() (crypto.PrivateKey, *x509.Certificate, error)
- func X509ToTLSCertificate(x509Cert *x509.Certificate, privateKey crypto.PrivateKey) (*tls.Certificate, error)
- type CertificateFixtures
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateCertificate ¶
func GenerateKeyPair ¶
func GenerateKeyPair() (crypto.PrivateKey, error)
func GenerateLeafCert ¶
func GenerateLeafCert(hostname string, organizationName string, issuerCert *x509.Certificate, issuerKey crypto.PrivateKey, isClient bool) (*tls.Certificate, error)
func GenerateRootCACert ¶
func GenerateRootCACert() (crypto.PrivateKey, *x509.Certificate, error)
func X509ToTLSCertificate ¶
func X509ToTLSCertificate(x509Cert *x509.Certificate, privateKey crypto.PrivateKey) (*tls.Certificate, error)
Types ¶
type CertificateFixtures ¶
type CertificateFixtures struct { RootCAs *x509.CertPool RootCAPrivateKey crypto.PrivateKey RootCACert *tls.Certificate ProxyCert *tls.Certificate ServerCert *tls.Certificate InvalidHostnameServerCert *tls.Certificate ClientCert *tls.Certificate }
func NewCertificateFixtures ¶
func NewCertificateFixtures(t *testing.T) *CertificateFixtures
Click to show internal directories.
Click to hide internal directories.