Package no.digipost.security.crl
Class RevocationChecker
- java.lang.Object
-
- no.digipost.security.crl.RevocationChecker
-
- All Implemented Interfaces:
org.apache.http.ssl.TrustStrategy
public class RevocationChecker extends Object implements org.apache.http.ssl.TrustStrategy
Used for configuring a HTTP Client to check if the server's certificate is revoked. The check is performed against a static Certificate Revocation List (CRL) file. When configuring theSSLContextfor aHttpClient, the RevocationChecker is set up as follows:HttpClientBuilder.create() .setSSLContext(SSLContexts.custom() .loadTrustMaterial(trustStore, new RevocationChecker(crlPath)) ).build();
-
-
Constructor Summary
Constructors Constructor Description RevocationChecker(Path crlPath)
-
-
-
Constructor Detail
-
RevocationChecker
public RevocationChecker(Path crlPath)
-
-
Method Detail
-
isTrusted
public boolean isTrusted(X509Certificate[] chain, String authType) throws CertificateException
- Specified by:
isTrustedin interfaceorg.apache.http.ssl.TrustStrategy- Throws:
CertificateException
-
-