Convert error message to rustls::Error with InvalidCertificate wrapper and custom ErrorKind
(kind: io::ErrorKind, msg: impl Into<String>)
| 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 |
no test coverage detected