(&self)
| 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> { |
no test coverage detected