Documentation ¶
Index ¶
- func CAFilePath(dir string) string
- func CertFilePath(dir string) string
- func ConvertFileToBase64(file string) string
- func CreateTemp(t testing.TB, dir, pattern string) *os.File
- func GenerateSelfSignedCA(filePath string) (*tls.Certificate, error)
- func GenerateSelfSignedCAPool(caCert *tls.Certificate) (*x509.CertPool, error)
- func GenerateServerCert(caCert *tls.Certificate, commonName string, serialNumber int64, ...) (*tls.Certificate, error)
- func GenerateTestCerts(tempDir string, commonName string, num int) ([]*tls.Certificate, *x509.CertPool, *x509.CertPool, error)
- func KeyFilePath(dir string) string
- func MkdirTemp(t testing.TB, dir, pattern string) string
- type CertChain
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CAFilePath ¶ added in v1.17.0
func CertFilePath ¶ added in v1.17.0
func ConvertFileToBase64 ¶ added in v1.17.0
func CreateTemp ¶
CreateTemp is a helper function which creates a temporary file, and it is automatically closed after test is completed
func GenerateSelfSignedCA ¶ added in v1.17.0
func GenerateSelfSignedCA(filePath string) (*tls.Certificate, error)
func GenerateSelfSignedCAPool ¶ added in v1.17.0
func GenerateSelfSignedCAPool(caCert *tls.Certificate) (*x509.CertPool, error)
func GenerateServerCert ¶ added in v1.17.0
func GenerateServerCert( caCert *tls.Certificate, commonName string, serialNumber int64, certPubFile string, certPrivFile string, ) (*tls.Certificate, error)
func GenerateTestCerts ¶ added in v1.17.0
func KeyFilePath ¶ added in v1.17.0
Types ¶
type CertChain ¶ added in v1.17.0
func GenerateTestChain ¶ added in v1.17.0
func GenerateTestChainWithSN ¶ added in v1.17.0
Click to show internal directories.
Click to hide internal directories.