From dev-return-41506-apmail-directory-dev-archive=directory.apache.org@directory.apache.org Fri Oct 5 08:20:50 2012 Return-Path: X-Original-To: apmail-directory-dev-archive@www.apache.org Delivered-To: apmail-directory-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0018CDC7C for ; Fri, 5 Oct 2012 08:20:49 +0000 (UTC) Received: (qmail 98866 invoked by uid 500); 5 Oct 2012 08:20:48 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 98763 invoked by uid 500); 5 Oct 2012 08:20:48 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 98749 invoked by uid 99); 5 Oct 2012 08:20:47 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Oct 2012 08:20:47 +0000 Date: Fri, 5 Oct 2012 19:20:47 +1100 (NCT) From: =?utf-8?Q?Rapha=C3=ABl_Ouazana_=28JIRA=29?= To: dev@directory.apache.org Message-ID: <1493817883.4572.1349425247733.JavaMail.jiratomcat@arcas> In-Reply-To: <1235954275.4539.1349423687337.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (DIRAPI-91) Use SUN default TrustManager MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DIRAPI-91?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D13470= 098#comment-13470098 ]=20 Rapha=C3=ABl Ouazana commented on DIRAPI-91: --------------------------------------- I precise that without this patch: if I don't provide a TrustManager, I am = not able to configure the keystore. =20 > Use SUN default TrustManager > ---------------------------- > > Key: DIRAPI-91 > URL: https://issues.apache.org/jira/browse/DIRAPI-91 > Project: Directory Client API > Issue Type: Improvement > Affects Versions: 1.0.0-M11, 1.0.0-M12 > Reporter: Rapha=C3=ABl Ouazana > > I want to connect to an OpenLDAP directory with LDAPS. > With JNDI, I just need to modify the common keystore, or to add a specifi= c one with javax.net.ssl.trustStore. > With DIRAPI, I need to provide a TrustManager (which I eventually can ini= tialize with SUN one). > I suggest to initialize the default TrustManager to SUN one. This can be = done in LdapConnectionConfig by replacing: > TrustManagerFactory tmFactory =3D TrustManagerFactory.getInst= ance( trustMgmtAlgo ); > tmFactory.init( KeyStore.getInstance( KeyStore.getDefaultType= () ) ); > with: > TrustManagerFactory tmFactory =3D TrustManagerFactory.getInst= ance(TrustManagerFactory.getDefaultAlgorithm()); > tmFactory.init((KeyStore)null); -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira