tlscommontest

package
v0.18.6 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenCA

func GenCA() (tls.Certificate, error)

func GenSignedCert

func GenSignedCert(
	ca tls.Certificate,
	keyUsage x509.KeyUsage,
	isCA bool,
	commonName string,
	dnsNames []string,
	ips []net.IP,
	expired bool,
) (tls.Certificate, error)

genSignedCert generates a CA and KeyPair and remove the need to depends on code of agent.

func GenTestCerts

func GenTestCerts(t *testing.T) map[string]*x509.Certificate

func GetCertFingerprint

func GetCertFingerprint(cert *x509.Certificate) string

GetCertFingerPrint takes a certificate and returns its HEX encoded SHA-256

Types

This section is empty.

Jump to

Keyboard shortcuts

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