1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! Integration between uselesskey test fixtures and `rustls-pki-types`.
//!
//! This crate owns the PKI extension traits that convert uselesskey
//! fixtures into `rustls-pki-types` types (`PrivateKeyDer`,
//! `CertificateDer`). The implementation lives under
//! [`crate::srp::pki`]. (The v0.7.x `uselesskey-core-rustls-pki`
//! published-internal shim was removed in v0.8.0.)
//!
//! With the `server-config` and `client-config` features, it also provides
//! convenience builders for `rustls::ServerConfig` and `rustls::ClientConfig`,
//! including mutual TLS (mTLS) support.
//!
//! # Convert a private key to rustls format
//!
//! ```
//! use uselesskey_core::Factory;
//! use uselesskey_rsa::{RsaFactoryExt, RsaSpec};
//! use uselesskey_rustls::RustlsPrivateKeyExt;
//!
//! let fx = Factory::random();
//! let rsa = fx.rsa("server", RsaSpec::rs256());
//! let key = rsa.private_key_der_rustls();
//! assert_eq!(key.secret_der(), rsa.private_key_pkcs8_der());
//! ```
//!
//! # Build TLS configs (requires `tls-config` + a crypto provider feature)
//!
//! ```no_run
//! use uselesskey_core::Factory;
//! use uselesskey_x509::{X509FactoryExt, ChainSpec};
//! use uselesskey_rustls::{RustlsServerConfigExt, RustlsClientConfigExt};
//!
//! let fx = Factory::random();
//! let chain = fx.x509_chain("svc", ChainSpec::new("test.example.com"));
//!
//! let server_cfg = chain.server_config_rustls();
//! let client_cfg = chain.client_config_rustls();
//! ```
pub use RustlsChainExt;
pub use ;
pub use RustlsServerConfigExt;
pub use RustlsClientConfigExt;
pub use RustlsMtlsExt;