MCPcopy Index your code
hub / github.com/RustPython/RustPython / to_rustls_cert_error

Function to_rustls_cert_error

crates/stdlib/src/ssl/cert.rs:128–132  ·  view source on GitHub ↗

Convert error message to rustls::Error with InvalidCertificate wrapper and custom ErrorKind

(kind: io::ErrorKind, msg: impl Into<String>)

Source from the content-addressed store, hash-verified

126
127 /// Convert error message to rustls::Error with InvalidCertificate wrapper and custom ErrorKind
128 pub fn to_rustls_cert_error(kind: io::ErrorKind, msg: impl Into<String>) -> rustls::Error {
129 rustls::Error::InvalidCertificate(rustls::CertificateError::Other(rustls::OtherError(
130 Arc::new(io::Error::new(kind, msg.into())),
131 )))
132 }
133}
134
135// Helper Functions for Certificate Parsing

Callers 1

verify_hostnameFunction · 0.85

Calls 2

newFunction · 0.85
OtherClass · 0.50

Tested by

no test coverage detected