cert

package
v1.18.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertEd25519ServingCert

func AssertEd25519ServingCert(t *testing.T, ctx context.Context, addr string)

AssertEd25519ServingCert asserts that the TLS server at addr presents a leaf certificate whose public key is an Ed25519 key.

func AssertRSAServingCert

func AssertRSAServingCert(t *testing.T, ctx context.Context, addr string)

AssertRSAServingCert asserts that the TLS server at addr presents a leaf certificate whose public key is an RSA key.

func CaptureServingCert

func CaptureServingCert(t *testing.T, ctx context.Context, addr string) *x509.Certificate

CaptureServingCert dials addr over TLS and returns the leaf certificate presented by the server. The handshake itself may fail when the server enforces mTLS and the empty client certificate is rejected; the leaf is captured before that via VerifyPeerCertificate, which runs on the client as soon as the server's certificate is received.

Types

This section is empty.

Jump to

Keyboard shortcuts

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