Skip to content

Commit

Permalink
Compatiblidade SunJSSE JDK 17.
Browse files Browse the repository at this point in the history
Substitui a classe legada com.sun.net.ssl.internal.ssl.Provider pela classe implementada na lista de provedores disponível na JVM em execução.
  • Loading branch information
henriquemeira committed Aug 10, 2023
1 parent 07603b1 commit a704cf9
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 a704cf9

Please sign in to comment.