pub struct TlsConfigBuilder { /* private fields */ }Expand description
Builder for constructing a rustls::ServerConfig.
Enforces NIAP CA PP requirements:
- FCS_TLSS_EXT.1: TLS 1.2 minimum, no deprecated protocols
- FCS_TLSC_EXT.1: FIPS-approved cipher suites only
- FCS_COP.1: Approved cryptographic operations
Implementations§
Source§impl TlsConfigBuilder
impl TlsConfigBuilder
Sourcepub fn with_cert_chain(self, path: &Path) -> Result<Self, TlsError>
pub fn with_cert_chain(self, path: &Path) -> Result<Self, TlsError>
Load the server certificate chain from a PEM file.
Sourcepub fn with_private_key(self, path: &Path) -> Result<Self, TlsError>
pub fn with_private_key(self, path: &Path) -> Result<Self, TlsError>
Load the server private key from a PEM or PKCS#8 file.
If the file content starts with pkcs11:, returns an error
indicating that the HSM crate should be used instead.
Sourcepub fn with_client_auth(
self,
ca_path: &Path,
required: bool,
) -> Result<Self, TlsError>
pub fn with_client_auth( self, ca_path: &Path, required: bool, ) -> Result<Self, TlsError>
Set up client certificate verification for mTLS.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TlsConfigBuilder
impl !RefUnwindSafe for TlsConfigBuilder
impl Send for TlsConfigBuilder
impl Sync for TlsConfigBuilder
impl Unpin for TlsConfigBuilder
impl UnsafeUnpin for TlsConfigBuilder
impl !UnwindSafe for TlsConfigBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more