Merge pull request #198 from sstefonic/fixTLSv10Test

update TLSv1.0 and TLSv1.1 test
pull/200/head
Chris Conlon 2024-06-07 12:41:45 -06:00 committed by GitHub
commit 87412b0639
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 20 additions and 6 deletions

View File

@ -1803,17 +1803,24 @@ public class WolfSSLSocketTest {
System.out.print("\tTLS 1.0 connection test");
/* skip if TLS 1.0 is not compiled in at native level */
if (WolfSSL.TLSv1Enabled() == false ||
WolfSSLTestFactory.securityPropContains(
"jdk.tls.disabledAlgorithms", "TLS")) {
if (WolfSSL.TLSv1Enabled() == false) {
System.out.println("\t\t... skipped");
return;
}
/* reset disabledAlgorithms property to test TLS 1.0 which is
* disabled by default */
String originalProperty =
Security.getProperty("jdk.tls.disabledAlgorithms");
Security.setProperty("jdk.tls.disabledAlgorithms", "");
protocolConnectionTest("TLSv1");
System.out.print("\tTLS 1.0 extended Socket test");
protocolConnectionTestExtendedSocket("TLSv1");
/* restore system property */
Security.setProperty("jdk.tls.disabledAlgorithms", originalProperty);
}
@Test
@ -1822,17 +1829,24 @@ public class WolfSSLSocketTest {
System.out.print("\tTLS 1.1 connection test");
/* skip if TLS 1.1 is not compiled in at native level */
if (WolfSSL.TLSv11Enabled() == false ||
WolfSSLTestFactory.securityPropContains(
"jdk.tls.disabledAlgorithms", "TLSv1.1")) {
if (WolfSSL.TLSv11Enabled() == false) {
System.out.println("\t\t... skipped");
return;
}
/* reset disabledAlgorithms property to test TLS 1.1 which is
* disabled by default */
String originalProperty =
Security.getProperty("jdk.tls.disabledAlgorithms");
Security.setProperty("jdk.tls.disabledAlgorithms", "");
protocolConnectionTest("TLSv1.1");
System.out.print("\tTLS 1.1 extended Socket test");
protocolConnectionTestExtendedSocket("TLSv1.1");
/* restore system property */
Security.setProperty("jdk.tls.disabledAlgorithms", originalProperty);
}
@Test