Skip to content

Commit

Permalink
Enable certificate revocation check in NonBlockingSocketFactory
Browse files Browse the repository at this point in the history
  • Loading branch information
fmarco76 committed Feb 26, 2025
1 parent d3ef7e8 commit 3da9f69
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,10 @@ public Socket connectSocket(Socket socket,
KeyManagerFactory kmf = KeyManagerFactory.getInstance("NssX509", "Mozilla-JSS");
KeyManager[] kms = kmf.getKeyManagers();

// Create JSSTrustManager since the default JSSNativeTrustManager
// does not support hostname validation and cert approval callback.
//
// JSSTrustManager currently does not support cert validation with
// OCSP and CRL.
//
// TODO: Fix JSSTrustManager to support OCSP and CRL, then replace
// DefaultSocketFactory with this class.

JSSTrustManager trustManager = new JSSTrustManager();
trustManager.setHostname(hostname);
trustManager.setCallback(connection.getCallback());
trustManager.setEnableCertRevokeVerify(true);

TrustManager[] tms = new TrustManager[] { trustManager };

Expand Down

0 comments on commit 3da9f69

Please sign in to comment.