From 22094368c2865dcfb6daf8366425212b721a4657 Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Thu, 05 Feb 2009 17:42:14 +0000
Subject: [PATCH] Merge ASN1 branch to trunk

---
 opends/src/server/org/opends/server/extensions/PlainSASLMechanismHandler.java |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/opends/src/server/org/opends/server/extensions/PlainSASLMechanismHandler.java b/opends/src/server/org/opends/server/extensions/PlainSASLMechanismHandler.java
index ee3a4b2..446c28c 100644
--- a/opends/src/server/org/opends/server/extensions/PlainSASLMechanismHandler.java
+++ b/opends/src/server/org/opends/server/extensions/PlainSASLMechanismHandler.java
@@ -42,7 +42,6 @@
 import org.opends.server.core.BindOperation;
 import org.opends.server.core.DirectoryServer;
 import org.opends.server.core.PasswordPolicyState;
-import org.opends.server.protocols.asn1.ASN1OctetString;
 import org.opends.server.protocols.internal.InternalClientConnection;
 import org.opends.server.types.AuthenticationInfo;
 import org.opends.server.types.ByteString;
@@ -164,7 +163,7 @@
       return;
     }
 
-    String credString = saslCredentials.stringValue();
+    String credString = saslCredentials.toString();
     int    length     = credString.length();
     int    nullPos1   = credString.indexOf('\u0000');
     if (nullPos1 < 0)
@@ -511,7 +510,7 @@
     {
       PasswordPolicyState pwPolicyState =
            new PasswordPolicyState(userEntry, false);
-      if (! pwPolicyState.passwordMatches(new ASN1OctetString(password)))
+      if (! pwPolicyState.passwordMatches(ByteString.valueOf(password)))
       {
         bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS);
 

--
Gitblit v1.10.0