Skip to content

Commit

Permalink
8317967: Enhance test/jdk/javax/net/ssl/TLSCommon/SSLEngineTestCase.j…
Browse files Browse the repository at this point in the history
…ava to handle default cases

Backport-of: 9728e21
  • Loading branch information
GoeLin committed Oct 23, 2023
1 parent 6414676 commit f1ce4ef
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions test/jdk/javax/net/ssl/TLSCommon/SSLEngineTestCase.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -134,7 +134,7 @@ public enum HandshakeMode {
* e.g. "TLSv1", "TLSv1.1", "TLSv1.2", "DTLSv1.0", "DTLSv1.2".
*/
public static final String TESTED_SECURITY_PROTOCOL
= System.getProperty("test.security.protocol", "TLS");
= System.getProperty("test.security.protocol");
/**
* Test mode: "norm", "norm_sni" or "krb".
* Modes "norm" and "norm_sni" are used to run
Expand Down Expand Up @@ -738,13 +738,18 @@ public void runTests() {
case "TLSv1.1":
runTests(Ciphers.SUPPORTED_NON_KRB_NON_SHA_CIPHERS);
break;
case "DTLSv1.1":
case "DTLS":
case "DTLSv1.2":
case "TLS":
case "TLSv1.2":
runTests(Ciphers.SUPPORTED_NON_KRB_CIPHERS);
break;
case "TLSv1.3":
runTests(Ciphers.TLS13_CIPHERS);
break;
default:
throw new Error("Test error: Unsupported test " +
"security protocol: " + TESTED_SECURITY_PROTOCOL);
}
break;
case "krb":
Expand Down

0 comments on commit f1ce4ef

Please sign in to comment.