Skip to content

Commit

Permalink
Update TLSSocketFactoryCompat.java
Browse files Browse the repository at this point in the history
  • Loading branch information
ShareASmile committed Jul 14, 2024
1 parent dc3e884 commit 277e7f0
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@ public TLSSocketFactoryCompat() throws KeyManagementException, NoSuchAlgorithmEx
internalSSLSocketFactory = context.getSocketFactory();
}

public TLSSocketFactoryCompat(
final TrustManagerFactory trustManagerFactory)
public TLSSocketFactoryCompat(final TrustManager[] tm)
throws NoSuchAlgorithmException, KeyManagementException {
final SSLContext context = SSLContext.getInstance("TLS");
context.init(null, trustManagerFactory.getTrustManagers(), null);
context.init(null, tm, new java.security.SecureRandom());
internalSSLSocketFactory = context.getSocketFactory();
}

Expand Down

0 comments on commit 277e7f0

Please sign in to comment.