Get SSL pointer - either from thread-local (during handshake) or from connection
(connection: &PyRwLock<SslConnection>)
| 560 | |
| 561 | // Get SSL pointer - either from thread-local (during handshake) or from connection |
| 562 | fn get_ssl_ptr_for_context_change(connection: &PyRwLock<SslConnection>) -> *mut sys::SSL { |
| 563 | // First check if we're in a handshake callback (lock already held) |
| 564 | if let Some(ptr) = HANDSHAKE_SSL_PTR.with(|cell| cell.get()) { |
| 565 | return ptr; |
| 566 | } |
| 567 | // Otherwise, acquire the lock normally |
| 568 | connection.read().ssl().as_ptr() |
| 569 | } |
| 570 | |
| 571 | // Get or create an ex_data index for SNI callback data |
| 572 | fn get_sni_ex_data_index() -> libc::c_int { |
no test coverage detected