From 7bdcb41c0f62967ec42d552f6002577dfb7019ca Mon Sep 17 00:00:00 2001
From: Ludovic Poitou <ludovic.poitou@forgerock.com>
Date: Tue, 02 Nov 2010 15:45:49 +0000
Subject: [PATCH] Sync from OpenDS (matthew_swift) Remove Platform class as it is no longer needed. Remove all getter methods which return passwords as Strings. Replace all setter methods which accept passwords as Strings with methods which accept passwords as char arrays, as per Java API security recommendations.

---
 sdk/src/org/opends/sdk/requests/SimpleBindRequest.java |   19 ++++---------------
 1 files changed, 4 insertions(+), 15 deletions(-)

diff --git a/sdk/src/org/opends/sdk/requests/SimpleBindRequest.java b/sdk/src/org/opends/sdk/requests/SimpleBindRequest.java
index 7109836..5316edf 100644
--- a/sdk/src/org/opends/sdk/requests/SimpleBindRequest.java
+++ b/sdk/src/org/opends/sdk/requests/SimpleBindRequest.java
@@ -22,7 +22,7 @@
  * CDDL HEADER END
  *
  *
- *      Copyright 2009 Sun Microsystems, Inc.
+ *      Copyright 2009-2010 Sun Microsystems, Inc.
  */
 
 package org.opends.sdk.requests;
@@ -114,18 +114,6 @@
 
 
   /**
-   * Returns the password of the Directory object that the client wishes to bind
-   * as decoded as a UTF-8 string. The password may be empty (but never {@code
-   * null}) when used for of anonymous or unauthenticated binds.
-   *
-   * @return The password of the Directory object that the client wishes to bind
-   *         as decoded as a UTF-8 string.
-   */
-  String getPasswordAsString();
-
-
-
-  /**
    * Sets the name of the Directory object that the client wishes to bind as.
    * The name may be empty (but never {@code null} when used for of anonymous
    * binds, or when using SASL authentication. The server shall not dereference
@@ -174,7 +162,8 @@
    * Sets the password of the Directory object that the client wishes to bind
    * as. The password will be converted to a UTF-8 octet string. The password
    * may be empty (but never {@code null}) when used for of anonymous or
-   * unauthenticated binds.
+   * unauthenticated binds. Subsequent modifications to the {@code password}
+   * array will not alter this bind request.
    *
    * @param password
    *          The password of the Directory object that the client wishes to
@@ -186,7 +175,7 @@
    * @throws NullPointerException
    *           If {@code password} was {@code null}.
    */
-  SimpleBindRequest setPassword(String password)
+  SimpleBindRequest setPassword(char[] password)
       throws UnsupportedOperationException, NullPointerException;
 
 }

--
Gitblit v1.10.0