From cfb153c8e985ad6f2192d56747fcba8af4df3428 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Thu, 18 Oct 2007 12:48:52 +0000
Subject: [PATCH] Fix for issue 2465: New - dsreplication -q -X : Java exception

---
 opends/src/quicksetup/org/opends/quicksetup/CliApplicationHelper.java |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/opends/src/quicksetup/org/opends/quicksetup/CliApplicationHelper.java b/opends/src/quicksetup/org/opends/quicksetup/CliApplicationHelper.java
index 79588bb..480d6bd 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/CliApplicationHelper.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/CliApplicationHelper.java
@@ -798,8 +798,15 @@
       ApplicationTrustManager trustManager)
   {
     boolean returnValue = false;
-    ApplicationTrustManager.Cause cause =
-      usedTrustManager.getLastRefusedCause();
+    ApplicationTrustManager.Cause cause;
+    if (usedTrustManager != null)
+    {
+      cause = usedTrustManager.getLastRefusedCause();
+    }
+    else
+    {
+      cause = null;
+    }
 
     LOG.log(Level.INFO, "Certificate exception cause: "+cause);
     UserDataCertificateException.Type excType = null;
@@ -948,7 +955,10 @@
       if ((chain != null) && (authType != null) && (host != null))
       {
         LOG.log(Level.INFO, "Accepting certificate presented by host "+host);
-        trustManager.acceptCertificate(chain, authType, host);
+        if (trustManager != null)
+        {
+          trustManager.acceptCertificate(chain, authType, host);
+        }
         accepted = true;
       }
       else

--
Gitblit v1.10.0