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

Function get_protocol_version_str

crates/stdlib/src/ssl/compat.rs:2323–2329  ·  view source on GitHub ↗

Convert rustls protocol version to string representation Returns the TLS version string - TLSv1.2, TLSv1.3, or "Unknown"

(version: &rustls::SupportedProtocolVersion)

Source from the content-addressed store, hash-verified

2321/// Returns the TLS version string
2322/// - TLSv1.2, TLSv1.3, or "Unknown"
2323pub(super) fn get_protocol_version_str(version: &rustls::SupportedProtocolVersion) -> &'static str {
2324 match version.version {
2325 rustls::ProtocolVersion::TLSv1_2 => "TLSv1.2",
2326 rustls::ProtocolVersion::TLSv1_3 => "TLSv1.3",
2327 _ => "Unknown",
2328 }
2329}
2330
2331/// Cipher suite information
2332///

Callers 1

extract_cipher_infoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected