From 139c40de1bc595ccd4b8ca952da9e2a37bc8a18e Mon Sep 17 00:00:00 2001
From: dugan <dugan@localhost>
Date: Wed, 05 Nov 2008 13:22:43 +0000
Subject: [PATCH] These fixes add confidentiality/integrity to the SASL GSSAPI and DIGEST-MD5 mechanisms. The issue links:

---
 opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPCompareTestCase.java |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPCompareTestCase.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPCompareTestCase.java
index d9afd2b..75c8a45 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPCompareTestCase.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPCompareTestCase.java
@@ -32,6 +32,7 @@
 import java.io.FileWriter;
 import java.util.ArrayList;
 
+import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
@@ -44,7 +45,7 @@
 import org.opends.server.types.OperatingSystem;
 import org.opends.server.types.ResultCode;
 import org.opends.server.util.Base64;
-
+import org.opends.server.tools.dsconfig.DSConfig;
 import static org.testng.Assert.*;
 
 import static org.opends.server.util.ServerConstants.*;
@@ -77,6 +78,12 @@
   {
     TestCaseUtils.startServer();
 
+    
+    TestCaseUtils.dsconfig(
+            "set-sasl-mechanism-handler-prop",
+            "--handler-name", "DIGEST-MD5",
+            "--set", "server-fqdn:" + "127.0.0.1");
+    
     File pwFile = File.createTempFile("valid-bind-password-", ".txt");
     pwFile.deleteOnExit();
     FileWriter fileWriter = new FileWriter(pwFile);
@@ -92,6 +99,14 @@
     invalidPasswordFile = pwFile.getAbsolutePath();
   }
 
+  @AfterClass
+  public void tearDown() throws Exception {
+   
+    TestCaseUtils.dsconfig(
+            "set-sasl-mechanism-handler-prop",
+            "--handler-name", "DIGEST-MD5",
+            "--remove", "server-fqdn:" + "127.0.0.1");
+  }
 
 
   /**
@@ -883,6 +898,7 @@
          "sn: User",
          "cn: Test User",
          "ds-privilege-name: bypass-acl",
+         "ds-privilege-name: proxied-auth",
          "userPassword: password",
          "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
               "cn=Password Policies,cn=config");
@@ -894,7 +910,7 @@
                          e.getOperationalAttributes());
     assertEquals(addOperation.getResultCode(), ResultCode.SUCCESS);
 
-
+    
     String[] args =
     {
       "-h", "127.0.0.1",
@@ -902,7 +918,6 @@
       "-o", "mech=DIGEST-MD5",
       "-o", "authid=u:test.user",
       "-o", "authzid=u:test.user",
-      "-o", "realm=o=test",
       "-w", "password",
       "--noPropertiesFile",
       "givenName:Test",

--
Gitblit v1.10.0