You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,19 @@ Full test coverage requires Windows because the provider calls Windows CNG APIs:
21
21
cargo test
22
22
```
23
23
24
+
The default test suite is hermetic. The crates.io interoperability test is ignored by default because it requires live network access; run it explicitly when needed:
25
+
26
+
```bash
27
+
cargo test test_to_internet -- --ignored
28
+
```
29
+
30
+
This crate only builds for Windows targets. From non-Windows hosts, run check and documentation workflows with an explicit Windows target:
Copy file name to clipboardExpand all lines: src/fips.rs
+15-21Lines changed: 15 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -3,27 +3,6 @@
3
3
// This product includes software developed at Datadog (https://www.datadoghq.com/)
4
4
// Copyright 2026 Datadog, Inc.
5
5
6
-
//! # FIPS support
7
-
//!
8
-
//! To use rustls with this crate in FIPS mode, perform the following actions.
9
-
//!
10
-
//! ## 1. Enable FIPS mode for Windows
11
-
//!
12
-
//! See [Microsoft documentation](https://learn.microsoft.com/en-us/windows/security/security-foundations/certification/fips-140-validation).
13
-
//!
14
-
//! ## 2. Enable the `fips` feature, or explicitly use the [crate::fips_provider()] function
15
-
//!
16
-
//! The fips feature changes the behaviour of [crate::default_provider()] to use FIPS-approved cipher suites and key exchange groups.
17
-
//! Or you can explicitly use the [crate::fips_provider()] function to create a provider with FIPS-approved cipher suites and key exchange groups.
18
-
//! If Windows is not running in FIPS mode, the provider will be empty.
19
-
//!
20
-
//! ## 3. Specify `require_ems` when constructing [rustls::ClientConfig] or [rustls::ServerConfig]
21
-
//!
22
-
//! See [rustls documentation](https://docs.rs/rustls/latest/rustls/client/struct.ClientConfig.html#structfield.require_ems) for rationale.
23
-
//!
24
-
//! ## 4. Validate the FIPS status of your ClientConfig or ServerConfig at runtime
25
-
//! See [rustls documentation on FIPS](https://docs.rs/rustls/latest/rustls/manual/_06_fips/index.html#3-validate-the-fips-status-of-your-clientconfigserverconfig-at-run-time).
26
-
27
6
use rustls::crypto::CryptoProvider;
28
7
use windows::Win32::Security::Cryptography::BCryptGetFipsAlgorithmMode;
/// 4. Validate the FIPS status of your `ClientConfig` or `ServerConfig` at runtime. See the rustls
34
+
/// [FIPS status documentation](https://docs.rs/rustls/latest/rustls/manual/_06_fips/index.html#3-validate-the-fips-status-of-your-clientconfigserverconfig-at-run-time).
35
+
///
42
36
/// Usage requires that Windows is running in FIPS mode, otherwise the provider will be empty.
//! 4. Validate the FIPS status of your `ClientConfig` or `ServerConfig` at runtime. See the rustls
74
+
//! [FIPS status documentation](https://docs.rs/rustls/latest/rustls/manual/_06_fips/index.html#3-validate-the-fips-status-of-your-clientconfigserverconfig-at-run-time).
75
+
//!
76
+
//! ## Platform support
77
+
//!
78
+
//! This crate uses Windows CNG APIs and only builds for Windows targets. From non-Windows hosts,
79
+
//! run checks and documentation builds with an explicit Windows target such as
80
+
//! `--target x86_64-pc-windows-msvc`.
57
81
#![warn(missing_docs)]
58
82
use rustls::crypto::{CryptoProvider,GetRandomFailed,SupportedKxGroup};
59
83
use rustls::SupportedCipherSuite;
@@ -79,6 +103,21 @@ mod verify;
79
103
80
104
pubmod cipher_suite {
81
105
//! Supported cipher suites.
106
+
//!
107
+
//! ```rust
108
+
//! use rustls::CipherSuite;
109
+
//! use rustls_cng_crypto::{cipher_suite, custom_provider, kx_group};
0 commit comments