From 265df7b49bf091c79771e8a286f911f8e3ba488c Mon Sep 17 00:00:00 2001
From: lutoff <lutoff@localhost>
Date: Wed, 20 Jun 2007 08:56:58 +0000
Subject: [PATCH] Add the following global options in dsservice
---
opends/src/ads/org/opends/admin/ads/util/ConnectionUtils.java | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/opends/src/ads/org/opends/admin/ads/util/ConnectionUtils.java b/opends/src/ads/org/opends/admin/ads/util/ConnectionUtils.java
index 1831427..a8e7656 100644
--- a/opends/src/ads/org/opends/admin/ads/util/ConnectionUtils.java
+++ b/opends/src/ads/org/opends/admin/ads/util/ConnectionUtils.java
@@ -233,11 +233,12 @@
* @param pwd passed as Context.SECURITY_CREDENTIALS if not null.
* @param timeout passed as com.sun.jndi.ldap.connect.timeout if > 0.
* @param env null or additional environment properties.
- * @param trustManager null or the trust manager to be invoked during SSL.
+ * @param trustManager null or the trust manager to be invoked during SSL
+ * negociation.
+ * @param keyManager null or the key manager to be invoked during SSL
* negociation.
* @param verifier null or the hostname verifier to be setup in the
* StartTlsResponse.
- *
* @return the established connection with the given parameters.
*
* @throws NamingException the exception thrown when instantiating
@@ -252,7 +253,8 @@
public static InitialLdapContext createStartTLSContext(String ldapsURL,
String dn, String pwd, int timeout, Hashtable<String, String> env,
- TrustManager trustManager, HostnameVerifier verifier)
+ TrustManager trustManager, KeyManager keyManager,
+ HostnameVerifier verifier)
throws NamingException
{
if (trustManager == null)
@@ -282,6 +284,7 @@
final String fDn = dn;
final String fPwd = pwd;
final TrustManager fTrustManager = trustManager;
+ final KeyManager fKeyManager = keyManager;
final HostnameVerifier fVerifier = verifier;
Thread t = new Thread(new Runnable() {
@@ -296,7 +299,7 @@
tls.setHostnameVerifier(fVerifier);
try
{
- tls.negotiate(new TrustedSocketFactory(fTrustManager,null));
+ tls.negotiate(new TrustedSocketFactory(fTrustManager,fKeyManager));
}
catch(IOException x) {
NamingException xx;
--
Gitblit v1.10.0