Documentation ¶
Overview ¶
Package utiltest provides testing helpers, for generating valid mock data like X509 certificates etc.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateECPrivateKey ¶ added in v0.2.0
GenerateECPrivateKey generates EC private key, PEM encoded.
func GeneratePKCS1PrivateKey ¶ added in v0.2.0
GeneratePKCS1PrivateKey generates RSA private key in PKCS1 format, PEM encoded.
func GenerateRSAPrivateKey ¶
GenerateRSAPrivateKey generates RSA private key and returns it as string in PEM format.
func GenerateX509Certificate ¶
GenerateX509Certificate generates random X.509 certificate and returns it as string in PEM format.
Types ¶
type PKI ¶
PKI struct holds X509 certificate and belonging RSA private key in PEM format.
func GeneratePKIErr ¶ added in v0.2.2
GeneratePKIErr generates fake PKI X.509 key pair sutiable for tests.
Click to show internal directories.
Click to hide internal directories.