Expand description
Self-signed certificates for TLS tests.
Generated fresh per test run rather than checked into the repository: nothing expires, and no key material — not even a throwaway one — lives in a public repo’s git history.
Structs§
- A certificate authority for issuing certificates in mutual-TLS tests —
self_signed’s single cert/key pair can’t produce this, since mTLS tests need a CA distinct from the leaf certificates it issues. - A self-signed certificate and its key, in memory.
Functions§
- A [
ClientTls] that trustscertsand checks the peer’s certificate againstserver_name. - A [
ClientTls] that trustscertsand presents a certificate issued byclient_ca— for a peer requiring mutual TLS. - Issues a certificate for
names, signed byca— for a peer that must present a certificateca(or aserver_tls_with_client_cabuilt from it) will accept. - Generates a self-signed certificate valid for
names(hostnames or IP addresses). - A [
ServerTls] presentingcerts. - As
server_tls, but also requires and verifies a client certificate issued byclient_ca. - Generates a self-signed CA for issuing certificates via
issue. - A [
ClientTls] that trusts a different self-signed authority than whatever the server under test presents — for a test asserting that an untrusted certificate is rejected.