certificate

package
v0.0.0-...-683b059 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Overview

Package certificate contains test certificates for use in public key cryptography. These can be used in both remote and local tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestCert3AltSubjectMatch

func TestCert3AltSubjectMatch() []string

TestCert3AltSubjectMatch provides the alternative subject name entries contained in TestCert3().ServerCred.Cert and TestCert3().ExpiredServerCred.Cert in encoded json format.

func TestCert3DomainSuffixMatch

func TestCert3DomainSuffixMatch() []string

TestCert3DomainSuffixMatch provides the domain suffix entries contained in TestCert3().ServerCred.Cert and TestCert3().ExpiredServerCred.Cert.

Types

type CertStore

type CertStore struct {
	CACred     Credential
	ServerCred Credential
	ClientCred Credential

	ExpiredServerCred Credential
}

CertStore holds a set of credentials which share the same CA certificate.

func TestCert1

func TestCert1() CertStore

TestCert1 retrieves a well-known set of certificates, for use by tests that want to establish an authenticator and client (e.g., for network EAP tests). This certificate does not provide any real security or privacy guarantees, as the certificate and private key are well-known (i.e., published in public repositories). NOTE: The certs will expire in around Jul 3020 except the one in ExpiredServerCred.

func TestCert2

func TestCert2() CertStore

TestCert2 provides the certs generated with a CA different from the one used for generating TestCert1. Both the private key and the Common Name of the CA are different. NOTE: The certs will expire in around Jul 3020 except the one in ExpiredServerCred.

func TestCert3

func TestCert3() CertStore

TestCert3 provides the certs where the server and expired server cert contain the same alternative subject name entries as TestCert3AltSubjectMatch. NOTE: The certs will expire in around Jul 3020 except the one in ExpiredServerCred.

type Credential

type Credential struct {
	Cert       string
	PrivateKey string
}

Credential holds a pair of certificate and private key.

Jump to

Keyboard shortcuts

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