Extract cipher information from a rustls CipherSuite This consolidates the common cipher extraction logic used across get_ciphers(), cipher(), and shared_ciphers() methods.
(suite: &rustls::SupportedCipherSuite)
| 2345 | /// This consolidates the common cipher extraction logic used across |
| 2346 | /// get_ciphers(), cipher(), and shared_ciphers() methods. |
| 2347 | pub(super) fn extract_cipher_info(suite: &rustls::SupportedCipherSuite) -> CipherInfo { |
| 2348 | let rustls_name = format!("{:?}", suite.suite()); |
| 2349 | let name = normalize_rustls_cipher_name(&rustls_name); |
| 2350 | let protocol = get_protocol_version_str(suite.version()); |
| 2351 | let bits = get_cipher_key_bits(&name); |
| 2352 | |
| 2353 | CipherInfo { |
| 2354 | name, |
| 2355 | protocol, |
| 2356 | bits, |
| 2357 | } |
| 2358 | } |
| 2359 | |
| 2360 | /// Convert curve name to rustls key exchange group |
| 2361 | /// |
no test coverage detected