Skip to content

Commit cabd854

Browse files
authored
Add support for ML-KEM in Post-Quantum TLS Config (aws#5870)
* Add support for ML-KEM in Post-Quantum TLS * Remove TODO
1 parent e6b99e6 commit cabd854

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "feature",
3+
"category": "AWS CRT HTTP Client",
4+
"contributor": "alexw91",
5+
"description": "Add support for ML-KEM in Post-Quantum TLS Config"
6+
}

http-clients/aws-crt-client/src/main/java/software/amazon/awssdk/http/crt/internal/AwsCrtConfigurationUtils.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ public static TlsCipherPreference resolveCipherPreference(Boolean postQuantumTls
5858
return defaultTls;
5959
}
6060

61-
// TODO: change this to the new PQ TLS Policy that stays up to date when it's ready
62-
TlsCipherPreference pqTls = TlsCipherPreference.TLS_CIPHER_PREF_PQ_TLSv1_0_2021_05;
61+
TlsCipherPreference pqTls = TlsCipherPreference.TLS_CIPHER_PQ_DEFAULT;
6362
if (!pqTls.isSupported()) {
6463
log.warn(() -> "Hybrid post-quantum cipher suites are not supported on this platform. The SDK will use the system "
6564
+ "default cipher suites instead");

http-clients/aws-crt-client/src/test/java/software/amazon/awssdk/http/crt/internal/AwsCrtConfigurationUtilsTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
package software.amazon.awssdk.http.crt.internal;
1717

1818
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
19-
import static software.amazon.awssdk.crt.io.TlsCipherPreference.TLS_CIPHER_PREF_PQ_TLSv1_0_2021_05;
19+
import static software.amazon.awssdk.crt.io.TlsCipherPreference.TLS_CIPHER_PQ_DEFAULT;
2020
import static software.amazon.awssdk.crt.io.TlsCipherPreference.TLS_CIPHER_SYSTEM_DEFAULT;
2121

2222
import java.time.Duration;
@@ -43,14 +43,14 @@ public static void tearDown() {
4343
@MethodSource("cipherPreferences")
4444
void resolveCipherPreference_pqNotSupported_shouldFallbackToSystemDefault(Boolean preferPqTls,
4545
TlsCipherPreference tlsCipherPreference) {
46-
Assumptions.assumeFalse(TLS_CIPHER_PREF_PQ_TLSv1_0_2021_05.isSupported());
46+
Assumptions.assumeFalse(TLS_CIPHER_PQ_DEFAULT.isSupported());
4747
assertThat(AwsCrtConfigurationUtils.resolveCipherPreference(preferPqTls)).isEqualTo(tlsCipherPreference);
4848
}
4949

5050
@Test
5151
void resolveCipherPreference_pqSupported_shouldHonor() {
52-
Assumptions.assumeTrue(TLS_CIPHER_PREF_PQ_TLSv1_0_2021_05.isSupported());
53-
assertThat(AwsCrtConfigurationUtils.resolveCipherPreference(true)).isEqualTo(TLS_CIPHER_PREF_PQ_TLSv1_0_2021_05);
52+
Assumptions.assumeTrue(TLS_CIPHER_PQ_DEFAULT.isSupported());
53+
assertThat(AwsCrtConfigurationUtils.resolveCipherPreference(true)).isEqualTo(TLS_CIPHER_PQ_DEFAULT);
5454
}
5555

5656
private static Stream<Arguments> cipherPreferences() {

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
<rxjava.version>2.2.21</rxjava.version>
125125
<commons-codec.verion>1.17.1</commons-codec.verion>
126126
<jmh.version>1.37</jmh.version>
127-
<awscrt.version>0.33.9</awscrt.version>
127+
<awscrt.version>0.34.1</awscrt.version>
128128

129129
<!--Test dependencies -->
130130
<junit5.version>5.10.0</junit5.version>

0 commit comments

Comments
 (0)