public boolean isRevocationValid ( ) { if ( basicResp == null ) return false ; if ( signCerts . size ( ) < 2 ) return false ; try { X509Certificate [ ] cs = ( X509Certificate [ ] ) getSignCertificateChain ( ) ; SingleResp sr = basicResp . getResponses ( ) [ 0 ] ; CertificateID cid = sr . getCertID ( ) ; X509Certificate sigcer = getSigningCertificate ( ) ; X509Certificate isscer = cs [ 1 ] ; CertificateID tis = new CertificateID ( new JcaDigestCalculatorProviderBuilder ( ) . build ( ) . get ( CertificateID . HASH_SHA1 ) , new JcaX509CertificateHolder ( isscer ) , sigcer . getSerialNumber ( ) ) ; return tis . equals ( cid ) ; } catch ( Exception ex ) { } return false ; }
Checks if OCSP revocation refers to the document signing certificate .