certs

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TODO: update the certs before 2025-02-01
	FakeCACert = `` /* 1350-byte string literal not displayed */

	FakeKey = `` /* 1708-byte string literal not displayed */

	FakeCert = `` /* 1241-byte string literal not displayed */

	FakeClientKey = `` /* 1704-byte string literal not displayed */

	FakeClientCert = `` /* 1188-byte string literal not displayed */

	FakeKey2 = `-----BEGIN PRIVATE KEY-----
MC4CAQAwBQYDK2VwBCIEIERk8ms6LU+Anq+cWg9pbfJ3KbXmWdjYaWKdMZKBV4sf
-----END PRIVATE KEY-----
`
	FakeCert2 = `` /* 847-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func GenerateCACert

func GenerateCACert(options ...CertificateOption) (*x509.Certificate, *rsa.PrivateKey, []byte, error)

func GenerateClientCert

func GenerateClientCert(caCert *x509.Certificate, caKey *rsa.PrivateKey, options ...CertificateOption) ([]byte, []byte, error)

func GenerateServerCert

func GenerateServerCert(caCert *x509.Certificate, caKey *rsa.PrivateKey, options ...CertificateOption) ([]byte, []byte, error)

Types

type CertificateOption

type CertificateOption func(*x509.Certificate)

func AddDNSName

func AddDNSName(name string) CertificateOption

func AddIPAddress

func AddIPAddress(addr net.IP) CertificateOption

Jump to

Keyboard shortcuts

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