Package net.maritimeconnectivity.pki
Class OCSPVerifier
- java.lang.Object
-
- net.maritimeconnectivity.pki.OCSPVerifier
-
public class OCSPVerifier extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RevocationInfo
verifyCertificateOCSP(X509Certificate cert, X509Certificate issuerCert)
Verifies a certificate against an issuer using OCSP.static RevocationInfo
verifyCertificateOCSP(X509Certificate cert, KeyStore trustStore)
Verifies a certificate against its issuer using OCSP.
-
-
-
Method Detail
-
verifyCertificateOCSP
public static RevocationInfo verifyCertificateOCSP(X509Certificate cert, KeyStore trustStore) throws KeyStoreException, OCSPValidationException
Verifies a certificate against its issuer using OCSP. In most cases you should probably useverifyCertificateChain
instead to verify the complete chain.- Parameters:
cert
- Certificate to validatetrustStore
- Truststore containing the issuer certificate- Returns:
- an OCSP result
- Throws:
KeyStoreException
- if the issuing CA certificate cannot be foundOCSPValidationException
- if the certificate cannot be verified using OCSP
-
verifyCertificateOCSP
public static RevocationInfo verifyCertificateOCSP(X509Certificate cert, X509Certificate issuerCert) throws OCSPValidationException
Verifies a certificate against an issuer using OCSP. In most cases you should probably useverifyCertificateChain
instead to verify the complete chain.- Parameters:
cert
- Certificate to validateissuerCert
- The issuer certificate- Returns:
- an OCSP result
- Throws:
OCSPValidationException
- if the certificate cannot be verified using OCSP
-
-