Java Code Examples for sun.security.x509.X509CertImpl#getFingerprint()

The following examples show how to use sun.security.x509.X509CertImpl#getFingerprint() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AnchorCertificates.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks if a certificate is a trust anchor.
 *
 * @param cert the certificate to check
 * @return true if the certificate is trusted.
 */
public static boolean contains(X509Certificate cert) {
    String key = X509CertImpl.getFingerprint(HASH, cert);
    boolean result = certs.contains(key);
    if (result && debug != null) {
        debug.println("AnchorCertificate.contains: matched " +
                cert.getSubjectDN());
    }
    return result;
}
 
Example 2
Source File: AnchorCertificates.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks if a certificate is a trust anchor.
 *
 * @param cert the certificate to check
 * @return true if the certificate is trusted.
 */
public static boolean contains(X509Certificate cert) {
    String key = X509CertImpl.getFingerprint(HASH, cert);
    boolean result = certs.contains(key);
    if (result && debug != null) {
        debug.println("AnchorCertificate.contains: matched " +
                cert.getSubjectDN());
    }
    return result;
}
 
Example 3
Source File: AnchorCertificates.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks if a certificate is a trust anchor.
 *
 * @param cert the certificate to check
 * @return true if the certificate is trusted.
 */
public static boolean contains(X509Certificate cert) {
    String key = X509CertImpl.getFingerprint(HASH, cert);
    boolean result = certs.contains(key);
    if (result && debug != null) {
        debug.println("AnchorCertificate.contains: matched " +
                cert.getSubjectDN());
    }
    return result;
}
 
Example 4
Source File: AnchorCertificates.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks if a certificate is a trust anchor.
 *
 * @param cert the certificate to check
 * @return true if the certificate is trusted.
 */
public static boolean contains(X509Certificate cert) {
    String key = X509CertImpl.getFingerprint(HASH, cert);
    boolean result = certs.contains(key);
    if (result && debug != null) {
        debug.println("AnchorCertificate.contains: matched " +
                cert.getSubjectDN());
    }
    return result;
}
 
Example 5
Source File: AnchorCertificates.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Checks if a certificate is a trust anchor.
 *
 * @param cert the certificate to check
 * @return true if the certificate is trusted.
 */
public static boolean contains(X509Certificate cert) {
    String key = X509CertImpl.getFingerprint(HASH, cert);
    boolean result = certs.contains(key);
    if (result && debug != null) {
        debug.println("AnchorCertificate.contains: matched " +
                cert.getSubjectDN());
    }
    return result;
}
 
Example 6
Source File: AnchorCertificates.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks if a certificate is a trust anchor.
 *
 * @param cert the certificate to check
 * @return true if the certificate is trusted.
 */
public static boolean contains(X509Certificate cert) {
    String key = X509CertImpl.getFingerprint(HASH, cert);
    boolean result = certs.contains(key);
    if (result && debug != null) {
        debug.println("AnchorCertificate.contains: matched " +
                cert.getSubjectDN());
    }
    return result;
}
 
Example 7
Source File: AnchorCertificates.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks if a certificate is a trust anchor.
 *
 * @param cert the certificate to check
 * @return true if the certificate is trusted.
 */
public static boolean contains(X509Certificate cert) {
    String key = X509CertImpl.getFingerprint(HASH, cert);
    boolean result = certs.contains(key);
    if (result && debug != null) {
        debug.println("AnchorCertificate.contains: matched " +
                cert.getSubjectDN());
    }
    return result;
}
 
Example 8
Source File: AnchorCertificates.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks if a certificate is a trust anchor.
 *
 * @param cert the certificate to check
 * @return true if the certificate is trusted.
 */
public static boolean contains(X509Certificate cert) {
    String key = X509CertImpl.getFingerprint(HASH, cert);
    boolean result = certs.contains(key);
    if (result && debug != null) {
        debug.println("AnchorCertificate.contains: matched " +
                cert.getSubjectDN());
    }
    return result;
}
 
Example 9
Source File: SymantecTLSPolicy.java    From openjsse with GNU General Public License v2.0 4 votes vote down vote up
private static String fingerprint(X509Certificate cert) {
    return (cert instanceof X509CertImpl)
           ? ((X509CertImpl)cert).getFingerprint("SHA-256")
           : X509CertImpl.getFingerprint("SHA-256", cert);
}
 
Example 10
Source File: SymantecTLSPolicy.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
private static String fingerprint(X509Certificate cert) {
    return (cert instanceof X509CertImpl)
           ? ((X509CertImpl)cert).getFingerprint("SHA-256")
           : X509CertImpl.getFingerprint("SHA-256", cert);
}
 
Example 11
Source File: SymantecTLSPolicy.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
private static String fingerprint(X509Certificate cert) {
    return (cert instanceof X509CertImpl)
           ? ((X509CertImpl)cert).getFingerprint("SHA-256")
           : X509CertImpl.getFingerprint("SHA-256", cert);
}
 
Example 12
Source File: SymantecTLSPolicy.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
private static String fingerprint(X509Certificate cert) {
    return (cert instanceof X509CertImpl)
           ? ((X509CertImpl)cert).getFingerprint("SHA-256")
           : X509CertImpl.getFingerprint("SHA-256", cert);
}
 
Example 13
Source File: SymantecTLSPolicy.java    From Bytecoder with Apache License 2.0 4 votes vote down vote up
private static String fingerprint(X509Certificate cert) {
    return (cert instanceof X509CertImpl)
           ? ((X509CertImpl)cert).getFingerprint("SHA-256")
           : X509CertImpl.getFingerprint("SHA-256", cert);
}
 
Example 14
Source File: SymantecTLSPolicy.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
private static String fingerprint(X509Certificate cert) {
    return (cert instanceof X509CertImpl)
           ? ((X509CertImpl)cert).getFingerprint("SHA-256")
           : X509CertImpl.getFingerprint("SHA-256", cert);
}