Merge branch '1.6.1-SNAPSHOT'

Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/1a09e25d
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/1a09e25d
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/1a09e25d

Branch: refs/heads/master
Commit: 1a09e25da225f2e2f2c78507c82a2805c52caf44
Parents: a050741 1ec33f1
Author: Josh Elser <els...@apache.org>
Authored: Mon Aug 4 21:31:25 2014 -0400
Committer: Josh Elser <els...@apache.org>
Committed: Mon Aug 4 21:31:25 2014 -0400

----------------------------------------------------------------------
 .../tokens/CredentialProviderToken.java         | 103 +++++++++++++++
 .../client/security/tokens/PasswordToken.java   |   8 +-
 .../conf/CredentialProviderFactoryShim.java     | 106 ++++++++-------
 .../tokens/CredentialProviderTokenTest.java     | 129 +++++++++++++++++++
 .../conf/CredentialProviderFactoryShimTest.java |   8 ++
 core/src/test/resources/passwords.jceks         | Bin 0 -> 963 bytes
 6 files changed, 306 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/1a09e25d/core/src/main/java/org/apache/accumulo/core/client/security/tokens/PasswordToken.java
----------------------------------------------------------------------
diff --cc 
core/src/main/java/org/apache/accumulo/core/client/security/tokens/PasswordToken.java
index 8119a1a,bd9feba..39cf8a0
--- 
a/core/src/main/java/org/apache/accumulo/core/client/security/tokens/PasswordToken.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/client/security/tokens/PasswordToken.java
@@@ -124,10 -124,14 +124,14 @@@ public class PasswordToken implements A
        throw new RuntimeException(e);
      }
    }
-   
-   private void setPassword(CharBuffer charBuffer) {
+ 
+   protected void setPassword(byte[] password) {
+     this.password = Arrays.copyOf(password, password.length);
+   }
+ 
+   protected void setPassword(CharBuffer charBuffer) {
      // encode() kicks back a C-string, which is not compatible with the old 
passwording system
 -    ByteBuffer bb = Constants.UTF8.encode(charBuffer);
 +    ByteBuffer bb = StandardCharsets.UTF_8.encode(charBuffer);
      // create array using byter buffer length
      this.password = new byte[bb.remaining()];
      bb.get(this.password);

Reply via email to