(&self)
| 3811 | |
| 3812 | #[pymethod] |
| 3813 | fn version(&self) -> Option<String> { |
| 3814 | // Extract cipher suite, releasing lock quickly |
| 3815 | let suite = { |
| 3816 | let conn_guard = self.connection.lock(); |
| 3817 | conn_guard.as_ref()?.negotiated_cipher_suite()? |
| 3818 | }; |
| 3819 | |
| 3820 | // Convert to string outside the lock |
| 3821 | let version_str = match suite.version().version { |
| 3822 | rustls::ProtocolVersion::TLSv1_2 => "TLSv1.2", |
| 3823 | rustls::ProtocolVersion::TLSv1_3 => "TLSv1.3", |
| 3824 | _ => "Unknown", |
| 3825 | }; |
| 3826 | |
| 3827 | Some(version_str.to_string()) |
| 3828 | } |
| 3829 | |
| 3830 | #[pymethod] |
| 3831 | fn selected_alpn_protocol(&self) -> Option<String> { |
no test coverage detected