private void verifySignature(X509Certificate cert) throws CertPathValidatorException {
  String msg="signature";
  if (debug != null)   debug.println("---checking " + msg + "...");
  try {
    cert.verify(prevPubKey,sigProvider);
  }
 catch (  SignatureException e) {
    throw new CertPathValidatorException(msg + " check failed",e,null,-1,BasicReason.INVALID_SIGNATURE);
  }
catch (  GeneralSecurityException e) {
    throw new CertPathValidatorException(msg + " check failed",e);
  }
  if (debug != null)   debug.println(msg + " verified.");
}

private void verifySignature ( X509Certificate cert ) throws CertPathValidatorException { String msg = "signature" ; if ( debug != null ) debug . println ( "---checking " + msg + "..." ) ; try { cert . verify ( prevPubKey , sigProvider ) ; } catch ( SignatureException e ) { throw new CertPathValidatorException ( msg + " check failed" , e , null , - 1 , BasicReason . INVALID_SIGNATURE ) ; } catch ( GeneralSecurityException e ) { throw new CertPathValidatorException ( msg + " check failed" , e ) ; } if ( debug != null ) debug . println ( msg + " verified." ) ; }
verifies the signature on the certificate using the previous public key .
