Skip to content

Commit 360f620

Browse files
authored
Remove unused security policies to avoid confusion (#2448)
1 parent ea52243 commit 360f620

File tree

5 files changed

+8
-35
lines changed

5 files changed

+8
-35
lines changed

tests/unit/s2n_security_policies_test.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,6 @@ int main(int argc, char **argv)
244244
"CloudFront-TLS-1-1-2016",
245245
"CloudFront-TLS-1-2-2018",
246246
"CloudFront-TLS-1-2-2019",
247-
/* CloudFront undocumented */
248-
"CloudFront-TLS-1-2-2020",
249247
};
250248
for (size_t i = 0; i < s2n_array_len(tls13_security_policy_strings); i++) {
251249
security_policy = NULL;

tls/s2n_cipher_preferences.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -989,18 +989,6 @@ const struct s2n_cipher_preferences cipher_preferences_cloudfront_tls_1_2_2019 =
989989
.suites = cipher_suites_cloudfront_tls_1_2_2019,
990990
};
991991

992-
/* CloudFront undocumented policies for testing */
993-
struct s2n_cipher_suite *cipher_suites_cloudfront_tls_1_2_2020[] = {
994-
S2N_TLS13_CLOUDFRONT_CIPHER_SUITES_20200716,
995-
&s2n_ecdhe_rsa_with_aes_128_gcm_sha256,
996-
&s2n_ecdhe_rsa_with_aes_256_gcm_sha384,
997-
&s2n_ecdhe_rsa_with_chacha20_poly1305_sha256
998-
};
999-
1000-
const struct s2n_cipher_preferences cipher_preferences_cloudfront_tls_1_2_2020 = {
1001-
.count = s2n_array_len(cipher_suites_cloudfront_tls_1_2_2020),
1002-
.suites = cipher_suites_cloudfront_tls_1_2_2020,
1003-
};
1004992
struct s2n_cipher_suite *cipher_suites_kms_tls_1_0_2018_10[] = {
1005993
&s2n_ecdhe_rsa_with_aes_256_gcm_sha384,
1006994
&s2n_ecdhe_rsa_with_aes_128_gcm_sha256,

tls/s2n_cipher_preferences.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ extern const struct s2n_cipher_preferences cipher_preferences_cloudfront_tls_1_0
8484
extern const struct s2n_cipher_preferences cipher_preferences_cloudfront_tls_1_1_2016_legacy;
8585
extern const struct s2n_cipher_preferences cipher_preferences_cloudfront_tls_1_2_2018_legacy;
8686
extern const struct s2n_cipher_preferences cipher_preferences_cloudfront_tls_1_2_2019_legacy;
87-
/* CloudFront undocumented policies for testing */
88-
extern const struct s2n_cipher_preferences cipher_preferences_cloudfront_tls_1_2_2020;
8987

9088
extern const struct s2n_cipher_preferences cipher_preferences_kms_tls_1_0_2018_10;
9189

tls/s2n_security_policies.c

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,14 @@ const struct s2n_security_policy security_policy_cloudfront_tls_1_2_2018 = {
216216
.ecc_preferences = &s2n_ecc_preferences_20200310,
217217
};
218218

219+
const struct s2n_security_policy security_policy_cloudfront_tls_1_2_2019 = {
220+
.minimum_protocol_version = S2N_TLS12,
221+
.cipher_preferences = &cipher_preferences_cloudfront_tls_1_2_2019,
222+
.kem_preferences = &kem_preferences_null,
223+
.signature_preferences = &s2n_signature_preferences_20200207,
224+
.ecc_preferences = &s2n_ecc_preferences_20200310,
225+
};
226+
219227
/* CloudFront viewer facing legacy TLS 1.2 policies */
220228
const struct s2n_security_policy security_policy_cloudfront_ssl_v_3_legacy = {
221229
.minimum_protocol_version = S2N_SSLv3,
@@ -264,22 +272,6 @@ const struct s2n_security_policy security_policy_cloudfront_tls_1_2_2019_legacy
264272
.signature_preferences = &s2n_signature_preferences_20140601,
265273
.ecc_preferences = &s2n_ecc_preferences_20140601,
266274
};
267-
/* CloudFront undocumented policies for testing */
268-
const struct s2n_security_policy security_policy_cloudfront_tls_1_2_2019 = {
269-
.minimum_protocol_version = S2N_TLS12,
270-
.cipher_preferences = &cipher_preferences_cloudfront_tls_1_2_2019,
271-
.kem_preferences = &kem_preferences_null,
272-
.signature_preferences = &s2n_signature_preferences_20200207,
273-
.ecc_preferences = &s2n_ecc_preferences_20200310,
274-
};
275-
276-
const struct s2n_security_policy security_policy_cloudfront_tls_1_2_2020 = {
277-
.minimum_protocol_version = S2N_TLS12,
278-
.cipher_preferences = &cipher_preferences_cloudfront_tls_1_2_2020,
279-
.kem_preferences = &kem_preferences_null,
280-
.signature_preferences = &s2n_signature_preferences_20200207,
281-
.ecc_preferences = &s2n_ecc_preferences_20200310,
282-
};
283275

284276
const struct s2n_security_policy security_policy_kms_tls_1_0_2018_10 = {
285277
.minimum_protocol_version = S2N_TLS10,
@@ -573,8 +565,6 @@ struct s2n_security_policy_selection security_policy_selection[] = {
573565
{ .version="CloudFront-TLS-1-1-2016-Legacy", .security_policy=&security_policy_cloudfront_tls_1_1_2016_legacy, .ecc_extension_required=0, .pq_kem_extension_required=0 },
574566
{ .version="CloudFront-TLS-1-2-2018-Legacy", .security_policy=&security_policy_cloudfront_tls_1_2_2018_legacy, .ecc_extension_required=0, .pq_kem_extension_required=0 },
575567
{ .version="CloudFront-TLS-1-2-2019-Legacy", .security_policy=&security_policy_cloudfront_tls_1_2_2019_legacy, .ecc_extension_required=0, .pq_kem_extension_required=0 },
576-
/* CloudFront undocumented */
577-
{ .version="CloudFront-TLS-1-2-2020", .security_policy=&security_policy_cloudfront_tls_1_2_2020, .ecc_extension_required=0, .pq_kem_extension_required=0 },
578568
{ .version="KMS-TLS-1-0-2018-10", .security_policy=&security_policy_kms_tls_1_0_2018_10, .ecc_extension_required=0, .pq_kem_extension_required=0 },
579569
#if !defined(S2N_NO_PQ)
580570
{ .version="KMS-PQ-TLS-1-0-2019-06", .security_policy=&security_policy_kms_pq_tls_1_0_2019_06, .ecc_extension_required=0, .pq_kem_extension_required=0 },

tls/s2n_security_policies.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ extern const struct s2n_security_policy security_policy_cloudfront_tls_1_0_2016;
9797
extern const struct s2n_security_policy security_policy_cloudfront_tls_1_1_2016;
9898
extern const struct s2n_security_policy security_policy_cloudfront_tls_1_2_2018;
9999
extern const struct s2n_security_policy security_policy_cloudfront_tls_1_2_2019;
100-
extern const struct s2n_security_policy security_policy_cloudfront_tls_1_2_2020;
101100

102101
extern const struct s2n_security_policy security_policy_kms_tls_1_0_2018_10;
103102
extern const struct s2n_security_policy security_policy_kms_fips_tls_1_2_2018_10;

0 commit comments

Comments
 (0)