From 26cdc2f7fd0e7e9417c2b4d4041eb5b66e4f9af4 Mon Sep 17 00:00:00 2001
From: lutoff <lutoff@localhost>
Date: Thu, 06 Sep 2007 12:55:04 +0000
Subject: [PATCH] - typo in the code.  ( "StartTLS" instead of "StartTSL" ) - dsconfig interactive secure connection enhancement

---
 opendj-sdk/opends/src/ads/org/opends/admin/ads/util/TrustedSocketFactory.java |   22 ++--------------------
 1 files changed, 2 insertions(+), 20 deletions(-)

diff --git a/opendj-sdk/opends/src/ads/org/opends/admin/ads/util/TrustedSocketFactory.java b/opendj-sdk/opends/src/ads/org/opends/admin/ads/util/TrustedSocketFactory.java
index 04be117..d792a3f 100644
--- a/opendj-sdk/opends/src/ads/org/opends/admin/ads/util/TrustedSocketFactory.java
+++ b/opendj-sdk/opends/src/ads/org/opends/admin/ads/util/TrustedSocketFactory.java
@@ -32,8 +32,6 @@
 import java.net.InetAddress;
 import java.util.Map;
 import java.util.HashMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 
 import java.security.GeneralSecurityException;
 
@@ -49,8 +47,6 @@
  */
 public class TrustedSocketFactory extends SSLSocketFactory
 {
-  static private final Logger LOG =
-    Logger.getLogger(TrustedSocketFactory.class.getName());
   private static Map<Thread, TrustManager> hmTrustManager =
     new HashMap<Thread, TrustManager>();
   private static Map<Thread, KeyManager> hmKeyManager =
@@ -150,12 +146,8 @@
 
     if (trustManager == null)
     {
-      LOG.log(Level.SEVERE, "Can't find a trust manager associated to thread " +
-          currentThread);
       if (keyManager == null)
       {
-        LOG.log(Level.SEVERE, "Can't find a key manager associated to thread " +
-            currentThread);
         result = new TrustedSocketFactory(null,null);
       }
       else
@@ -172,8 +164,6 @@
     {
       if (keyManager == null)
       {
-        LOG.log(Level.SEVERE,
-            "Can't find a key manager associated to thread " + currentThread);
         result = hmDefaultFactoryTm.get(trustManager);
         if (result == null)
         {
@@ -296,19 +286,11 @@
 
       try {
         SSLContext sslCtx = SSLContext.getInstance(algorithm);
-        if (trustManager == null)
-        {
-          LOG.log(Level.SEVERE, "Warning : no trust for this factory");
-        }
-        else
+        if (trustManager != null)
         {
           tm = new TrustManager[] { trustManager };
         }
-        if (keyManager == null)
-        {
-          LOG.log(Level.SEVERE, "Warning : no key for this factory");
-        }
-        else
+        if (keyManager != null)
         {
           km = new KeyManager[] { keyManager };
         }

--
Gitblit v1.10.0