public synchronized void verify(PublicKey key,Provider sigProvider) throws CRLException, NoSuchAlgorithmException, InvalidKeyException, SignatureException {
  if (signedCRL == null) {
    throw new CRLException("Uninitialized CRL");
  }
  Signature sigVerf=null;
  if (sigProvider == null) {
    sigVerf=Signature.getInstance(sigAlgId.getName());
  }
 else {
    sigVerf=Signature.getInstance(sigAlgId.getName(),sigProvider);
  }
  sigVerf.initVerify(key);
  if (tbsCertList == null) {
    throw new CRLException("Uninitialized CRL");
  }
  sigVerf.update(tbsCertList,0,tbsCertList.length);
  if (!sigVerf.verify(signature)) {
    throw new SignatureException("Signature does not match.");
  }
  verifiedPublicKey=key;
}

public synchronized void verify ( PublicKey key , Provider sigProvider ) throws CRLException , NoSuchAlgorithmException , InvalidKeyException , SignatureException { if ( signedCRL == null ) { throw new CRLException ( "Uninitialized CRL" ) ; } Signature sigVerf = null ; if ( sigProvider == null ) { sigVerf = Signature . getInstance ( sigAlgId . getName ( ) ) ; } else { sigVerf = Signature . getInstance ( sigAlgId . getName ( ) , sigProvider ) ; } sigVerf . initVerify ( key ) ; if ( tbsCertList == null ) { throw new CRLException ( "Uninitialized CRL" ) ; } sigVerf . update ( tbsCertList , 0 , tbsCertList . length ) ; if ( ! sigVerf . verify ( signature ) ) { throw new SignatureException ( "Signature does not match." ) ; } verifiedPublicKey = key ; }
verifies that this crl was signed using the private key that corresponds to the given public key , and that the signature verification was computed by the given provider . note that the specified provider object does not have to be registered in the provider list .
