modules/jretools/src/main/java/org/apache/harmony/jretools/keytool/CertChainVerifier.java [160:181]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private static boolean checkSignature(X509Certificate cert,
            PublicKey pubKey, String sigProvider, String mdProvider)
            throws CertificateEncodingException, NoSuchAlgorithmException,
            NoSuchProviderException {
        try {
            if (sigProvider == null) {
                cert.verify(pubKey);
            } else {
                cert.verify(pubKey, sigProvider);
            }
        } catch (SignatureException e) {
            System.out.println("The signature is incorrect for certificate: ");
            KeyStoreCertPrinter.printX509CertDetailed(cert, mdProvider);
        } catch (Exception e) {
            System.out.println(e);
            System.out
                    .println("Signature verification failed for certificate: ");
            KeyStoreCertPrinter.printX509CertDetailed(cert, mdProvider);
            return false;
        }
        return true;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



modules/jdktools/src/main/java/org/apache/harmony/tools/keytool/CertChainVerifier.java [160:181]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private static boolean checkSignature(X509Certificate cert,
            PublicKey pubKey, String sigProvider, String mdProvider)
            throws CertificateEncodingException, NoSuchAlgorithmException,
            NoSuchProviderException {
        try {
            if (sigProvider == null) {
                cert.verify(pubKey);
            } else {
                cert.verify(pubKey, sigProvider);
            }
        } catch (SignatureException e) {
            System.out.println("The signature is incorrect for certificate: ");
            KeyStoreCertPrinter.printX509CertDetailed(cert, mdProvider);
        } catch (Exception e) {
            System.out.println(e);
            System.out
                    .println("Signature verification failed for certificate: ");
            KeyStoreCertPrinter.printX509CertDetailed(cert, mdProvider);
            return false;
        }
        return true;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



