Documentation ¶
Index ¶
- Constants
- Variables
- 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 ¶
View Source
var ( // Hard coding the kafka msg in bytes. Need to figure out a way to generate this. Msg1ForFlowType1 = []byte{}/* 168 elements not displayed */ Msg2ForFlowType1 = []byte{}/* 216 elements not displayed */ Msg1ForFlowType2 = []byte{}/* 168 elements not displayed */ Msg2ForFlowType2 = []byte{}/* 216 elements not displayed */ )
Functions ¶
func GenerateCACert ¶ added in v0.5.14
func GenerateCACert(options ...CertificateOption) (*x509.Certificate, *rsa.PrivateKey, []byte, error)
func GenerateClientCert ¶ added in v0.5.14
func GenerateClientCert(caCert *x509.Certificate, caKey *rsa.PrivateKey, options ...CertificateOption) ([]byte, []byte, error)
func GenerateServerCert ¶ added in v0.5.14
func GenerateServerCert(caCert *x509.Certificate, caKey *rsa.PrivateKey, options ...CertificateOption) ([]byte, []byte, error)
Types ¶
type CertificateOption ¶ added in v0.5.14
type CertificateOption func(*x509.Certificate)
func AddDNSName ¶ added in v0.5.14
func AddDNSName(name string) CertificateOption
func AddIPAddress ¶ added in v0.5.14
func AddIPAddress(addr net.IP) CertificateOption
Click to show internal directories.
Click to hide internal directories.