modules/jretools/src/main/java/org/apache/harmony/jretools/keytool/KeyStoreCertPrinter.java [241:270]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    static void printX509CertDetailed(X509Certificate x509cert,
            String providerName) throws CertificateEncodingException,
            NoSuchAlgorithmException, NoSuchProviderException {
        System.out.println("Owner: " + x509cert.getSubjectX500Principal());
        System.out.println("Issuer: " + x509cert.getIssuerX500Principal());
        System.out.println("Serial number: "
                + Integer.toHexString(x509cert.getSerialNumber().intValue()));
        System.out.println("Validity period \n\t from:  "
                + x509cert.getNotBefore() + "\n\t until: "
                + x509cert.getNotAfter());

        // print certificate fingerprints (MD5 and SHA1).
        byte[] encodedCert;
        try {
            encodedCert = x509cert.getEncoded();
        } catch (CertificateEncodingException e) {
            throw new CertificateEncodingException(
                    "Failed to encode the certificate", e);
        }

        String strMD5 = "MD5";
        String strSHA1 = "SHA1";

        System.out.print("Certificate fingerprints: " + "\n\t " + strMD5
                + ":  ");
        printMD(encodedCert, strMD5, providerName);

        System.out.print("\t " + strSHA1 + ": ");
        printMD(encodedCert, strSHA1, providerName);
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



modules/jdktools/src/main/java/org/apache/harmony/tools/keytool/KeyStoreCertPrinter.java [241:270]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    static void printX509CertDetailed(X509Certificate x509cert,
            String providerName) throws CertificateEncodingException,
            NoSuchAlgorithmException, NoSuchProviderException {
        System.out.println("Owner: " + x509cert.getSubjectX500Principal());
        System.out.println("Issuer: " + x509cert.getIssuerX500Principal());
        System.out.println("Serial number: "
                + Integer.toHexString(x509cert.getSerialNumber().intValue()));
        System.out.println("Validity period \n\t from:  "
                + x509cert.getNotBefore() + "\n\t until: "
                + x509cert.getNotAfter());

        // print certificate fingerprints (MD5 and SHA1).
        byte[] encodedCert;
        try {
            encodedCert = x509cert.getEncoded();
        } catch (CertificateEncodingException e) {
            throw new CertificateEncodingException(
                    "Failed to encode the certificate", e);
        }

        String strMD5 = "MD5";
        String strSHA1 = "SHA1";

        System.out.print("Certificate fingerprints: " + "\n\t " + strMD5
                + ":  ");
        printMD(encodedCert, strMD5, providerName);

        System.out.print("\t " + strSHA1 + ": ");
        printMD(encodedCert, strSHA1, providerName);
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



