Search in sources :

Example 11 with LDAPCertStoreParameters

use of java.security.cert.LDAPCertStoreParameters in project jdk8u_jdk by JetBrains.

the class NoLDAP method main.

public static void main(String[] args) throws Exception {
    try {
        Class.forName("javax.naming.ldap.LdapName");
        System.out.println("LDAP is present, test skipped");
        return;
    } catch (ClassNotFoundException ignore) {
    }
    try {
        CertStore.getInstance("LDAP", new LDAPCertStoreParameters());
        throw new RuntimeException("NoSuchAlgorithmException expected");
    } catch (NoSuchAlgorithmException x) {
        System.out.println("NoSuchAlgorithmException thrown as expected");
    }
}
Also used : NoSuchAlgorithmException(java.security.NoSuchAlgorithmException) LDAPCertStoreParameters(java.security.cert.LDAPCertStoreParameters)

Aggregations

LDAPCertStoreParameters (java.security.cert.LDAPCertStoreParameters)11 CertStoreParameters (java.security.cert.CertStoreParameters)3 NoSuchAlgorithmException (java.security.NoSuchAlgorithmException)1