Skip to content

Commit 3ebd384

Browse files
authored
fix: policy util should ignore deprecated TLS1.2 kems if missing (#5372)
1 parent ebe6d83 commit 3ebd384

27 files changed

+5
-29
lines changed

bin/policy.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,11 @@ int main(int argc, char *const *argv)
102102
if (policy->kem_preferences && policy->kem_preferences != &kem_preferences_null) {
103103
printf("pq:\n");
104104
printf("- revision: %i\n", policy->kem_preferences->tls13_pq_hybrid_draft_revision);
105-
printf("- kems:\n");
106-
for (size_t i = 0; i < policy->kem_preferences->kem_count; i++) {
107-
printf("-- %s\n", policy->kem_preferences->kems[i]->name);
105+
if (policy->kem_preferences->kem_count > 0) {
106+
printf("- kems:\n");
107+
for (size_t i = 0; i < policy->kem_preferences->kem_count; i++) {
108+
printf("-- %s\n", policy->kem_preferences->kems[i]->name);
109+
}
108110
}
109111
printf("- kem groups:\n");
110112
for (size_t i = 0; i < policy->kem_preferences->tls13_kem_group_count; i++) {

tests/policy_snapshot/snapshots/20240730

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ certificate signature schemes:
5252
- legacy_ecdsa_sha224
5353
pq:
5454
- revision: 5
55-
- kems:
5655
- kem groups:
5756
-- SecP256r1Kyber768Draft00
5857
-- X25519Kyber768Draft00

tests/policy_snapshot/snapshots/20241001

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ certificate signature schemes:
5252
- legacy_ecdsa_sha224
5353
pq:
5454
- revision: 5
55-
- kems:
5655
- kem groups:
5756
-- X25519MLKEM768
5857
-- SecP256r1MLKEM768

tests/policy_snapshot/snapshots/20241001_pq_mixed

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ certificate signature schemes:
5252
- legacy_ecdsa_sha224
5353
pq:
5454
- revision: 5
55-
- kems:
5655
- kem groups:
5756
-- X25519MLKEM768
5857
-- SecP256r1MLKEM768

tests/policy_snapshot/snapshots/20250512

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ certificate signature schemes:
5858
- legacy_ecdsa_sha224
5959
pq:
6060
- revision: 5
61-
- kems:
6261
- kem groups:
6362
-- X25519MLKEM768
6463
-- SecP256r1MLKEM768

tests/policy_snapshot/snapshots/AWS-CRT-SDK-TLSv1.2-2023-PQ

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ curves:
5050
- secp384r1
5151
pq:
5252
- revision: 5
53-
- kems:
5453
- kem groups:
5554
-- X25519MLKEM768
5655
-- SecP256r1MLKEM768

tests/policy_snapshot/snapshots/KMS-FIPS-TLS-1-2-2024-10

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ curves:
3131
- secp521r1
3232
pq:
3333
- revision: 5
34-
- kems:
3534
- kem groups:
3635
-- X25519MLKEM768
3736
-- SecP256r1MLKEM768

tests/policy_snapshot/snapshots/PQ-TLS-1-0-2023-01-24

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ curves:
4040
- secp384r1
4141
pq:
4242
- revision: 5
43-
- kems:
4443
- kem groups:
4544
-- x25519_kyber-512-r3
4645
-- secp256r1_kyber-512-r3

tests/policy_snapshot/snapshots/PQ-TLS-1-2-2023-04-07

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ curves:
4848
- secp384r1
4949
pq:
5050
- revision: 0
51-
- kems:
5251
- kem groups:
5352
-- x25519_kyber-512-r3
5453
-- secp256r1_kyber-512-r3

tests/policy_snapshot/snapshots/PQ-TLS-1-2-2023-04-08

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ curves:
5555
- secp384r1
5656
pq:
5757
- revision: 0
58-
- kems:
5958
- kem groups:
6059
-- x25519_kyber-512-r3
6160
-- secp256r1_kyber-512-r3

0 commit comments

Comments
 (0)