From 3bd757820d295d1bf98c2dccbae18421f8b47a0b Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Wed, 15 Jun 2011 21:54:27 +0000
Subject: [PATCH] Fix OPENDJ-202: All bind request APIs should take byte or char arrays for passwords

---
 opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/requests/BindClientImpl.java |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/requests/BindClientImpl.java b/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/requests/BindClientImpl.java
index 1d8c7a6..8396e18 100644
--- a/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/requests/BindClientImpl.java
+++ b/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/requests/BindClientImpl.java
@@ -23,13 +23,13 @@
  *
  *
  *      Copyright 2010 Sun Microsystems, Inc.
+ *      Portions copyright 2011 ForgeRock AS
  */
 
 package org.forgerock.opendj.ldap.requests;
 
 
 
-import org.forgerock.opendj.ldap.ByteString;
 import org.forgerock.opendj.ldap.ConnectionSecurityLayer;
 import org.forgerock.opendj.ldap.ErrorResultException;
 import org.forgerock.opendj.ldap.controls.Control;
@@ -56,9 +56,9 @@
    */
   BindClientImpl(final BindRequest initialBindRequest)
   {
-    this.nextBindRequest = new GenericBindRequestImpl(initialBindRequest
-        .getName(), initialBindRequest.getAuthenticationType(), ByteString
-        .empty(), this);
+    this.nextBindRequest = new GenericBindRequestImpl(
+        initialBindRequest.getName(),
+        initialBindRequest.getAuthenticationType(), new byte[0], this);
     for (final Control control : initialBindRequest.getControls())
     {
       this.nextBindRequest.addControl(control);
@@ -141,8 +141,7 @@
    *          The authentication value to be used in the next bind request.
    * @return A reference to this bind client.
    */
-  final BindClient setNextAuthenticationValue(
-      final ByteString authenticationValue)
+  final BindClient setNextAuthenticationValue(final byte[] authenticationValue)
   {
     nextBindRequest.setAuthenticationValue(authenticationValue);
     return this;

--
Gitblit v1.10.0