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

Method check_deferred_cert_error

crates/stdlib/src/ssl.rs:2393–2402  ·  view source on GitHub ↗

Check for deferred certificate verification errors (TLS 1.3) If an error exists, raise it and clear it from storage

(&self, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

2391 // Check for deferred certificate verification errors (TLS 1.3)
2392 // If an error exists, raise it and clear it from storage
2393 fn check_deferred_cert_error(&self, vm: &VirtualMachine) -> PyResult<()> {
2394 let error_opt = self.deferred_cert_error.read().clone();
2395 if let Some(error_msg) = error_opt {
2396 // Clear the error so it's only raised once
2397 *self.deferred_cert_error.write() = None;
2398 // Raise OSError with the stored error message
2399 return Err(vm.new_os_error(error_msg));
2400 }
2401 Ok(())
2402 }
2403
2404 // Get socket timeout as Duration
2405 pub(crate) fn get_socket_timeout(&self, vm: &VirtualMachine) -> PyResult<Option<Duration>> {

Callers 2

readMethod · 0.80
writeMethod · 0.80

Calls 5

new_os_errorMethod · 0.80
ErrClass · 0.50
cloneMethod · 0.45
readMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected