Documentation
¶
Index ¶
- Variables
- func BuildCertChain(identifiers []string, subjectSerialNumber string, ...) ([]*x509.Certificate, []*rsa.PrivateKey, error)
- func BuildRootCert() (*rsa.PrivateKey, *x509.Certificate, error)
- func BuildSigningCert(identifiers []string, intermediateL2Cert *x509.Certificate, ...) (*rsa.PrivateKey, *x509.Certificate, error)
- func Certificate() tls.Certificate
- func CertificateFile(t *testing.T) string
- func CertsToChain(certs []*x509.Certificate) *cert.Chain
- func InvalidCertificate() tls.Certificate
- func Truststore() *x509.CertPool
- func TruststoreFile(t *testing.T) string
Constants ¶
This section is empty.
Variables ¶
View Source
var CertificateData []byte
CertificateData contains the PEM-encoded test certificate and its key.
View Source
var InvalidCertificateData []byte
InvalidCertificateData contains the PEM-encoded invalid test certificate and its key.
View Source
var TruststoreData []byte
TruststoreData contains the PEM-encoded test truststore.
Functions ¶
func BuildCertChain ¶
func BuildCertChain(identifiers []string, subjectSerialNumber string, signCertKeyUsage *x509.KeyUsage) ([]*x509.Certificate, []*rsa.PrivateKey, error)
BuildCertChain generates a certificate chain, including root, intermediate, and signing certificates.
func BuildRootCert ¶
func BuildRootCert() (*rsa.PrivateKey, *x509.Certificate, error)
func BuildSigningCert ¶
func BuildSigningCert(identifiers []string, intermediateL2Cert *x509.Certificate, intermediateL2Key *rsa.PrivateKey, serialNumber string, keyUsage *x509.KeyUsage) (*rsa.PrivateKey, *x509.Certificate, error)
func CertificateFile ¶
CertificateFile returns the path to a file containing a valid test certificate and its key.
func CertsToChain ¶
func CertsToChain(certs []*x509.Certificate) *cert.Chain
func InvalidCertificate ¶
func InvalidCertificate() tls.Certificate
InvalidCertificate returns an invalid test certificate.
func TruststoreFile ¶
TruststoreFile returns the path to a file containing a test truststore.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.