-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Each Test class is started in a JVM with different system properties.
- Loading branch information
Showing
4 changed files
with
57 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import static org.junit.jupiter.api.Assertions.assertThrows; | ||
|
||
import java.io.IOException; | ||
import java.net.UnknownHostException; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import org.junitpioneer.jupiter.ClearSystemProperty; | ||
import org.junitpioneer.jupiter.SetSystemProperty; | ||
|
||
/** | ||
* Unit test. | ||
*/ | ||
@ClearSystemProperty(key = "com.sun.net.ssl.checkRevocation") | ||
@ClearSystemProperty(key = "com.sun.security.enableCRLDP") | ||
public class SSLPokeClientProtocolTest { | ||
|
||
@Test | ||
@SetSystemProperty(key = "jdk.tls.client.protocols", value = "SSLv3") | ||
public void sslV3() throws UnknownHostException, IOException { | ||
assertThrows(javax.net.ssl.SSLHandshakeException.class, | ||
() -> SSLPoke.connect("www.badssl.com", 443)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import static org.junit.jupiter.api.Assertions.assertNotNull; | ||
|
||
import java.io.IOException; | ||
import java.net.UnknownHostException; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import org.junitpioneer.jupiter.ClearSystemProperty; | ||
|
||
/** | ||
* Unit test. | ||
*/ | ||
@ClearSystemProperty(key = "com.sun.net.ssl.checkRevocation") | ||
@ClearSystemProperty(key = "com.sun.security.enableCRLDP") | ||
public class SSLPokeIgnoreRevocationTest { | ||
|
||
@Test | ||
public void ignoreRevocation() throws UnknownHostException, IOException { | ||
assertNotNull(SSLPoke.connect("revoked-rsa-dv.ssl.com", 443)); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters