MCPcopy Create free account
hub / github.com/RustPython/RustPython / version

Method version

crates/stdlib/src/openssl.rs:2633–2642  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

2631
2632 #[pymethod]
2633 fn version(&self) -> Option<&'static str> {
2634 // Use thread-local SSL pointer during handshake to avoid deadlock
2635 let ssl_ptr = get_ssl_ptr_for_context_change(&self.connection);
2636 // Return None if handshake is not complete (CPython behavior)
2637 if unsafe { sys::SSL_is_init_finished(ssl_ptr) } == 0 {
2638 return None;
2639 }
2640 let v = unsafe { ssl::SslRef::from_ptr(ssl_ptr).version_str() };
2641 if v == "unknown" { None } else { Some(v) }
2642 }
2643
2644 #[pymethod]
2645 fn cipher(&self) -> Option<CipherTuple> {

Callers 1

cipher_to_tupleFunction · 0.45

Calls 2

SomeClass · 0.50

Tested by

no test coverage detected