From 3ee2cc20c54dbde5e7a9fceace7134a156ee63d3 Mon Sep 17 00:00:00 2001
From: lutoff <lutoff@localhost>
Date: Fri, 15 Jun 2007 08:06:11 +0000
Subject: [PATCH] Add the following global options in dsservice to handle client truststore

---
 opends/src/ads/org/opends/admin/ads/util/ApplicationTrustManager.java |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/opends/src/ads/org/opends/admin/ads/util/ApplicationTrustManager.java b/opends/src/ads/org/opends/admin/ads/util/ApplicationTrustManager.java
index 2a3587b..cf2f9ec 100644
--- a/opends/src/ads/org/opends/admin/ads/util/ApplicationTrustManager.java
+++ b/opends/src/ads/org/opends/admin/ads/util/ApplicationTrustManager.java
@@ -94,8 +94,9 @@
 
   /**
    * The default constructor.
+   * @param keystore The keystore to use for this trustmanager.
    */
-  public ApplicationTrustManager()
+  public ApplicationTrustManager(KeyStore keystore)
   {
     TrustManagerFactory tmf = null;
     String algo = "SunX509";
@@ -103,7 +104,7 @@
     try
     {
       tmf = TrustManagerFactory.getInstance(algo, provider);
-      tmf.init((KeyStore)null);
+      tmf.init(keystore);
       sunJSSEX509TrustManager =
         (X509TrustManager)(tmf.getTrustManagers())[0];
     }
@@ -294,7 +295,7 @@
    */
   public ApplicationTrustManager createCopy()
   {
-    ApplicationTrustManager copy = new ApplicationTrustManager();
+    ApplicationTrustManager copy = new ApplicationTrustManager(null);
     copy.lastRefusedAuthType = lastRefusedAuthType;
     copy.lastRefusedChain = lastRefusedChain;
     copy.lastRefusedCause = lastRefusedCause;

--
Gitblit v1.10.0