Skip to content

Commit 9e8ce31

Browse files
committed
lib: expose Verifier as part of public API.
Additionally add a brief comment to the `tls_config()` doc pointing out that constructing a `Verifier` by hand allows customizing the rustls `ClientConfig` for advanced use cases.
1 parent 1770e0c commit 9e8ce31

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/lib.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use rustls::ClientConfig;
66
use std::sync::Arc;
77

88
mod verification;
9-
use verification::Verifier;
9+
pub use verification::Verifier;
1010

1111
// Build the Android module when generating docs so that
1212
// the Android-specific functions are included.
@@ -28,7 +28,8 @@ mod tests;
2828
pub use tests::ffi::*;
2929

3030
/// Creates and returns a `rustls` configuration that verifies TLS
31-
/// certificates in the best way for the underlying OS platform.
31+
/// certificates in the best way for the underlying OS platform, using
32+
/// safe defaults for the `rustls` configuration.
3233
///
3334
/// # Example
3435
///
@@ -46,6 +47,10 @@ pub use tests::ffi::*;
4647
/// }
4748
/// ```
4849
///
50+
/// If you require more control over the rustls `ClientConfig`, you can
51+
/// instantiate a [Verifier] with [Verifier::default] and then use it
52+
/// with [rustls::ConfigBuilder::with_custom_certificate_verifier].
53+
///
4954
/// Refer to the crate level documentation to see what platforms
5055
/// are currently supported.
5156
pub fn tls_config() -> ClientConfig {

0 commit comments

Comments
 (0)