Return-Path: X-Original-To: apmail-directory-commits-archive@www.apache.org Delivered-To: apmail-directory-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DDD3CDC38 for ; Fri, 5 Oct 2012 08:55:36 +0000 (UTC) Received: (qmail 77708 invoked by uid 500); 5 Oct 2012 08:55:35 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 77542 invoked by uid 500); 5 Oct 2012 08:55:31 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 77495 invoked by uid 99); 5 Oct 2012 08:55:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Oct 2012 08:55:29 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Oct 2012 08:55:28 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 2924523888FE for ; Fri, 5 Oct 2012 08:54:45 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1394415 - /directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnectionConfig.java Date: Fri, 05 Oct 2012 08:54:45 -0000 To: commits@directory.apache.org From: kayyagari@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121005085445.2924523888FE@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: kayyagari Date: Fri Oct 5 08:54:44 2012 New Revision: 1394415 URL: http://svn.apache.org/viewvc?rev=1394415&view=rev Log: o use the default algorithm and initialize with the null keystore to load all the default trusted certificates (DIRAPI-91) Modified: directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnectionConfig.java Modified: directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnectionConfig.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnectionConfig.java?rev=1394415&r1=1394414&r2=1394415&view=diff ============================================================================== --- directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnectionConfig.java (original) +++ directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnectionConfig.java Fri Oct 5 08:54:44 2012 @@ -112,13 +112,13 @@ public class LdapConnectionConfig */ private void setDefaultTrustManager() { - String trustMgmtAlgo = "SunX509"; + String trustMgmtAlgo = TrustManagerFactory.getDefaultAlgorithm(); try { TrustManagerFactory tmFactory = TrustManagerFactory.getInstance( trustMgmtAlgo ); - tmFactory.init( KeyStore.getInstance( KeyStore.getDefaultType() ) ); - + tmFactory.init( ( KeyStore ) null ); + TrustManager factoryTrustManagers[] = tmFactory.getTrustManagers(); for ( int i = 0; i < factoryTrustManagers.length; i++ )