Skip to content

Commit

Permalink
Merge pull request #16 from henriquemeira/patch-sunjsse-jdk17
Browse files Browse the repository at this point in the history
Compatiblidade SunJSSE JDK 17.
  • Loading branch information
Samuel-Oliveira committed Aug 10, 2023
2 parents 07603b1 + a704cf9 commit 7a1d3bf
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ static void inicia(Certificado certificado, InputStream iSCacert) throws Certifi

System.setProperty("sun.security.ssl.allowUnsafeRenegotiation", "true");
System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
for (Provider p : Security.getProviders()) {
if (p.getName().equals("SunJSSE")) {
Security.addProvider(p);
}
}

System.clearProperty("javax.net.ssl.keyStore");
System.clearProperty("javax.net.ssl.keyStorePassword");
Expand Down

0 comments on commit 7a1d3bf

Please sign in to comment.