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

Method version

crates/stdlib/src/ssl.rs:3813–3828  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

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> {

Callers 4

cert_to_dictFunction · 0.45
cert_to_dictFunction · 0.45
cert_der_to_dict_helperFunction · 0.45
extract_cipher_infoFunction · 0.45

Calls 5

to_stringMethod · 0.80
SomeClass · 0.50
lockMethod · 0.45
as_refMethod · 0.45

Tested by

no test coverage detected