Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ private void doTest() throws Exception {

// JEP 527: Post-Quantum Hybrid Key Exchange for TLS 1.3
// https://openjdk.org/jeps/527
// X25519MLKEM768 is the primary hybrid group mandated by JEP 527 and must always
// be present. SecP256r1MLKEM768 and SecP384r1MLKEM1024 are optional; their
// availability is JDK-vendor/build-dependent (e.g. absent on Oracle JDK 27 EA).

private void testPostQuantumTLS() throws Exception {
log("Beginning JEP 527 testing: Post-Quantum Hybrid Key Exchange for TLS 1.3");
Expand All @@ -69,13 +72,17 @@ private void testPostQuantumTLS() throws Exception {
}
log("Default TLS named groups (" + namedGroups.length + "): " + java.util.Arrays.toString(namedGroups));

// All three hybrid groups must be present; ordering is vendor-dependent
java.util.Set<String> groups = new java.util.HashSet<>(java.util.Arrays.asList(namedGroups));
for (String hybrid : new String[]{"X25519MLKEM768", "SecP256r1MLKEM768", "SecP384r1MLKEM1024"}) {
if (!groups.contains(hybrid)) {
throw new Exception("JEP 527 FAILED: hybrid group missing from supported set: " + hybrid);
if (!groups.contains("X25519MLKEM768")) {
throw new Exception("JEP 527 FAILED: X25519MLKEM768 missing from default SSLParameters named groups");
}
log("Hybrid group present: X25519MLKEM768");
for (String hybrid : new String[]{"SecP256r1MLKEM768", "SecP384r1MLKEM1024"}) {
if (groups.contains(hybrid)) {
log("Hybrid group present: " + hybrid);
} else {
log("Hybrid group optional (not present on this JDK build): " + hybrid);
}
log("Hybrid group present: " + hybrid);
}

log("Leaving JEP 527 testing");
Expand Down