In the context of validating a signature, I want to verify the validity of the signing certificate in the time when the document was signed. I realized that CRL revocation check method is not used if I especify a past date while if I used current time or null, the revocation checks works fine. I am using the next code
CertificateFactory cf = CertificateFactory.getInstance( "X.509" );
CertPath certPath = cf.generateCertPath( certs );
CertPathValidator cpv = CertPathValidator.getInstance( "PKIX", "SUN" );
PKIXParameters params = new PKIXParameters( ks );
params.setDate( signingTime );
params.setRevocationEnabled( true );
cpvResult = (PKIXCertPathValidatorResult) cpv.validate( certPath, params );
I have already enabled the system property EnabledCRLDP. Besides, OCSP is not an universal solution since it does not works is some certificates.
There is some reason to not use CRL revocation method in a past time validation?
There is some way to force to use CRL in this case?