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

Function to_rustls_invalid_cert

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

Convert error message to rustls::Error with InvalidCertificate wrapper

(msg: impl Into<String>)

Source from the content-addressed store, hash-verified

119
120 /// Convert error message to rustls::Error with InvalidCertificate wrapper
121 pub fn to_rustls_invalid_cert(msg: impl Into<String>) -> rustls::Error {
122 rustls::Error::InvalidCertificate(rustls::CertificateError::Other(rustls::OtherError(
123 Arc::new(invalid_data(msg)),
124 )))
125 }
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 {

Callers 2

verify_hostnameFunction · 0.85
verify_ip_addressFunction · 0.85

Calls 3

newFunction · 0.85
invalid_dataFunction · 0.85
OtherClass · 0.50

Tested by

no test coverage detected