Documentation ¶
Index ¶
- Constants
- func GenerateCACert(options ...CertificateOption) (*x509.Certificate, *rsa.PrivateKey, []byte, error)
- func GenerateClientCert(caCert *x509.Certificate, caKey *rsa.PrivateKey, options ...CertificateOption) ([]byte, []byte, error)
- func GenerateServerCert(caCert *x509.Certificate, caKey *rsa.PrivateKey, options ...CertificateOption) ([]byte, []byte, error)
- type CertificateOption
Constants ¶
View Source
const ( // TODO: update the certs before 2025-02-01 FakeCACert = `` /* 1350-byte string literal not displayed */ FakeKey = `` /* 1708-byte string literal not displayed */ FakeCert = `` /* 1241-byte string literal not displayed */ FakeClientKey = `` /* 1704-byte string literal not displayed */ FakeClientCert = `` /* 1188-byte string literal not displayed */ FakeKey2 = `-----BEGIN PRIVATE KEY----- MC4CAQAwBQYDK2VwBCIEIERk8ms6LU+Anq+cWg9pbfJ3KbXmWdjYaWKdMZKBV4sf -----END PRIVATE KEY----- ` FakeCert2 = `` /* 847-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
func GenerateCACert ¶
func GenerateCACert(options ...CertificateOption) (*x509.Certificate, *rsa.PrivateKey, []byte, error)
func GenerateClientCert ¶
func GenerateClientCert(caCert *x509.Certificate, caKey *rsa.PrivateKey, options ...CertificateOption) ([]byte, []byte, error)
func GenerateServerCert ¶
func GenerateServerCert(caCert *x509.Certificate, caKey *rsa.PrivateKey, options ...CertificateOption) ([]byte, []byte, error)
Types ¶
type CertificateOption ¶
type CertificateOption func(*x509.Certificate)
func AddDNSName ¶
func AddDNSName(name string) CertificateOption
func AddIPAddress ¶
func AddIPAddress(addr net.IP) CertificateOption
Click to show internal directories.
Click to hide internal directories.