public class OcspCertificateValidator extends Object
| Modifier and Type | Field and Description |
|---|---|
private com.sun.jersey.api.client.Client |
client |
private static int |
CONNECT_TIMEOUT |
private static String |
CONTENT_TYPE_HEADER |
private static String |
HTTPS |
private static org.slf4j.Logger |
logger |
private static String |
OCSP_REQUEST_CONTENT_TYPE |
private com.google.common.cache.LoadingCache<OcspRequest,OcspStatus> |
ocspCache |
private static int |
READ_TIMEOUT |
private Map<String,X509Certificate> |
trustedCAs |
private URI |
validationAuthorityURI |
| Constructor and Description |
|---|
OcspCertificateValidator(NiFiProperties properties) |
| Modifier and Type | Method and Description |
|---|---|
private X509Certificate |
getIssuerCertificate(X509Certificate[] certificates)
Gets the issuer certificate.
|
private X509Certificate |
getOcspCertificate(NiFiProperties properties)
Loads the ocsp certificate if specified.
|
private OcspStatus |
getOcspStatus(OcspRequest ocspStatusKey)
Gets the OCSP status for the specified subject and issuer certificates.
|
private X509Certificate |
getSubjectCertificate(X509Certificate[] certificates)
Gets the subject certificate.
|
private Map<String,X509Certificate> |
getTrustedCAs(NiFiProperties properties)
Loads the trusted certificate authorities according to the specified
properties.
|
private X509Certificate |
getTrustedResponderCertificate(X509Certificate responderCertificate,
X509Certificate issuerCertificate)
Gets the trusted responder certificate.
|
void |
validate(javax.servlet.http.HttpServletRequest request)
Validates the specified certificate using OCSP if configured.
|
private static final org.slf4j.Logger logger
private static final String HTTPS
private static final String CONTENT_TYPE_HEADER
private static final String OCSP_REQUEST_CONTENT_TYPE
private static final int CONNECT_TIMEOUT
private static final int READ_TIMEOUT
private URI validationAuthorityURI
private com.sun.jersey.api.client.Client client
private Map<String,X509Certificate> trustedCAs
private com.google.common.cache.LoadingCache<OcspRequest,OcspStatus> ocspCache
public OcspCertificateValidator(NiFiProperties properties)
private X509Certificate getOcspCertificate(NiFiProperties properties)
properties - private Map<String,X509Certificate> getTrustedCAs(NiFiProperties properties)
properties - public void validate(javax.servlet.http.HttpServletRequest request)
throws CertificateStatusException
request - CertificateStatusExceptionprivate X509Certificate getSubjectCertificate(X509Certificate[] certificates)
certificates - private X509Certificate getIssuerCertificate(X509Certificate[] certificates)
certificates - private OcspStatus getOcspStatus(OcspRequest ocspStatusKey)
subjectCertificate - issuerCertificate - private X509Certificate getTrustedResponderCertificate(X509Certificate responderCertificate, X509Certificate issuerCertificate)
responderCertificate - issuerCertificate - Copyright © 2015 Apache NiFi (incubating). All rights reserved.