Expand description
Certificates for a test that needs a server a real client can verify.
Behind the test-support feature, so nothing ships it.
Every client in this workspace verifies what it connects to, and there is
no way to switch that off — so a test that stands up a server over TLS
has to hand its client an authority to trust. issue_for is that: a
throwaway authority, a leaf under it, and the authority’s PEM to put in
the client’s root store.
Separate from crate::local, which is a machine’s one authority kept
on disk and trusted once. Nothing here touches disk or outlives the
process.
Structs§
- Test
Certificate - A leaf, its key and the authority that signed it.
Functions§
- issue_
for - A fresh authority and a leaf covering
names, which may be hostnames or address literals. - self_
signed_ pem - A self-signed certificate and its private key, both PEM, for
name. - server_
config - A
rustls::ServerConfigcoveringnames, and the authority a client has to trust to reach it.