uselesskey-rustls 0.3.0

rustls-pki-types and rustls config adapters for uselesskey X.509/key fixtures.
Documentation

uselesskey-rustls

Crates.io docs.rs License: MIT OR Apache-2.0

rustls / rustls-pki-types adapter for uselesskey test fixtures.

Converts fixture certs and keys into CertificateDer / PrivateKeyDer, with optional ServerConfig / ClientConfig builders (including mTLS support).

Features

Feature Description
x509 (default) X.509 cert and chain conversions
rsa RSA keypairs → PrivateKeyDer
ecdsa ECDSA keypairs → PrivateKeyDer
ed25519 Ed25519 keypairs → PrivateKeyDer
all All key conversion traits
server-config rustls::ServerConfig builders
client-config rustls::ClientConfig builders
tls-config Both server and client config builders
rustls-ring ring crypto provider integration
rustls-aws-lc-rs aws-lc-rs crypto provider integration

Usage

[dev-dependencies]
uselesskey-rustls = { version = "0.3.0", features = ["tls-config", "rustls-ring"] }
use uselesskey_core::Factory;
use uselesskey_rustls::{RustlsClientConfigExt, RustlsServerConfigExt};
use uselesskey_x509::{ChainSpec, X509FactoryExt};

let fx = Factory::random();
let chain = fx.x509_chain("svc", ChainSpec::new("test.example.com"));

let server = chain.server_config_rustls();
let client = chain.client_config_rustls();

let _ = (server, client);

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

See the uselesskey crate for full documentation.