tlstest

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2021 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Overview

Package tlstest contains utility methods to create test certificates. It is not meant to be used in production.

Index

Constants

View Source
const (
	// CA is the name of the CA toplevel cert.
	CA = "ca"
)

Variables

This section is empty.

Functions

func CreateCA

func CreateCA(root string)

CreateCA creates the toplevel 'ca' certificate and key, and places it in the provided directory. Temporary files are also created in that directory.

func CreateSignedCert

func CreateSignedCert(root, parent, serial, name, commonName string)

CreateSignedCert creates a new certificate signed by the provided parent, with the provided serial number, name and common name. name is the file name to use. Common Name is the certificate common name.

Types

type ClientServerKeyPairs

type ClientServerKeyPairs struct {
	ServerCert string
	ServerKey  string
	ServerCA   string
	ServerName string
	ClientCert string
	ClientKey  string
	ClientCA   string
}

func CreateClientServerCertPairs

func CreateClientServerCertPairs(root string) ClientServerKeyPairs

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL