File 4012-ssl-Remove-not-used-record-filed-key_size.patch of Package erlang
From 0ba015af6c3f31be6d5988c6a195cb6ff18fd488 Mon Sep 17 00:00:00 2001
From: Ingela Anderton Andin <ingela@erlang.org>
Date: Wed, 8 Nov 2023 11:06:33 +0100
Subject: [PATCH 2/3] ssl: Remove not used record filed key_size
---
lib/ssl/src/ssl_cipher.erl | 21 ---------------------
lib/ssl/src/ssl_connection.hrl | 1 -
lib/ssl/src/ssl_record.hrl | 1 -
lib/ssl/test/ssl_session_SUITE.erl | 1 -
4 files changed, 24 deletions(-)
diff --git a/lib/ssl/src/ssl_cipher.erl b/lib/ssl/src/ssl_cipher.erl
index 98445c3255..107f8b2d56 100644
--- a/lib/ssl/src/ssl_cipher.erl
+++ b/lib/ssl/src/ssl_cipher.erl
@@ -63,7 +63,6 @@
signature_schemes_1_2/1,
scheme_to_components/1,
hash_size/1,
- effective_key_bits/1,
key_material/1,
signature_algorithm_to_scheme/1,
bulk_cipher_algorithm/1]).
@@ -108,7 +107,6 @@ security_parameters(Version, CipherSuite, SecParams) ->
cipher_suite = CipherSuite,
bulk_cipher_algorithm = bulk_cipher_algorithm(Cipher),
cipher_type = type(Cipher),
- key_size = effective_key_bits(Cipher),
expanded_key_material_length = expanded_key_material(Cipher),
key_material_length = key_material(Cipher),
iv_size = iv_size(Cipher),
@@ -765,25 +763,6 @@ expanded_key_material(Cipher) when Cipher == aes_128_cbc;
Cipher == chacha20_poly1305 ->
unknown.
-effective_key_bits(null) ->
- 0;
-effective_key_bits(des_cbc) ->
- 56;
-effective_key_bits(Cipher) when Cipher == rc4_128;
- Cipher == aes_128_cbc;
- Cipher == aes_128_gcm;
- Cipher == aes_128_ccm;
- Cipher == aes_128_ccm_8 ->
- 128;
-effective_key_bits('3des_ede_cbc') ->
- 168;
-effective_key_bits(Cipher) when Cipher == aes_256_cbc;
- Cipher == aes_256_gcm;
- Cipher == aes_256_ccm;
- Cipher == aes_256_ccm_8;
- Cipher == chacha20_poly1305 ->
- 256.
-
iv_size(Cipher) when Cipher == null;
Cipher == rc4_128 ->
0;
diff --git a/lib/ssl/src/ssl_connection.hrl b/lib/ssl/src/ssl_connection.hrl
index c5eaed3bc4..5316c93b0d 100644
--- a/lib/ssl/src/ssl_connection.hrl
+++ b/lib/ssl/src/ssl_connection.hrl
@@ -184,7 +184,6 @@
%%
%% cipher_type - TLS 1.3 uses only AEAD ciphers
%% iv_size - not used
-%% key_size - not used
%% key_material_length - not used
%% expanded_key_material_length - used in SSL 3.0
%% mac_algorithm - not used
diff --git a/lib/ssl/src/ssl_record.hrl b/lib/ssl/src/ssl_record.hrl
index 57496ffc69..1e7496640d 100644
--- a/lib/ssl/src/ssl_record.hrl
+++ b/lib/ssl/src/ssl_record.hrl
@@ -58,7 +58,6 @@
bulk_cipher_algorithm,
cipher_type,
iv_size,
- key_size, % unit 8
key_material_length, % unit 8
expanded_key_material_length, % unit 8
mac_algorithm, % unit 8
diff --git a/lib/ssl/test/ssl_session_SUITE.erl b/lib/ssl/test/ssl_session_SUITE.erl
index 1743daeb5b..070354b28d 100644
--- a/lib/ssl/test/ssl_session_SUITE.erl
+++ b/lib/ssl/test/ssl_session_SUITE.erl
@@ -771,7 +771,6 @@ connection_states(Random) ->
bulk_cipher_algorithm = 0,
cipher_type = 0,
iv_size = 0,
- key_size = 0,
key_material_length = 0,
expanded_key_material_length = 0,
mac_algorithm = 0,
--
2.35.3