storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject [02/50] storm git commit: STORM-348: Netty SASL Authentication
Date Thu, 13 Nov 2014 19:36:57 GMT
STORM-348: Netty SASL Authentication


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/19ad1351
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/19ad1351
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/19ad1351

Branch: refs/heads/master
Commit: 19ad13510cb42963f868fd8bd785b4937dd348ab
Parents: 3bce04c
Author: Raghavendra Nandagopal <speaktoraghav@gmail.com>
Authored: Mon Jul 28 17:42:05 2014 -0700
Committer: Raghavendra Nandagopal <speaktoraghav@gmail.com>
Committed: Mon Jul 28 17:42:05 2014 -0700

----------------------------------------------------------------------
 .../src/jvm/backtype/storm/messaging/netty/SaslUtils.java    | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/19ad1351/storm-core/src/jvm/backtype/storm/messaging/netty/SaslUtils.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/messaging/netty/SaslUtils.java b/storm-core/src/jvm/backtype/storm/messaging/netty/SaslUtils.java
index a4cc0ba..a2d0b26 100644
--- a/storm-core/src/jvm/backtype/storm/messaging/netty/SaslUtils.java
+++ b/storm-core/src/jvm/backtype/storm/messaging/netty/SaslUtils.java
@@ -24,6 +24,7 @@ import java.util.Map;
 import javax.security.sasl.Sasl;
 
 import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.io.Charsets;
 
 import backtype.storm.Config;
 
@@ -45,8 +46,8 @@ class SaslUtils {
      * @return password as a char array.
      */
     static char[] encodePassword(byte[] password) {
-        return new String(Base64.encodeBase64(password),
-                Charset.defaultCharset()).toCharArray();
+        return new String(Base64.encodeBase64(password), Charsets.UTF_8)
+                .toCharArray();
     }
 
     /**
@@ -57,8 +58,7 @@ class SaslUtils {
      * @return identifier as a char array.
      */
     static String encodeIdentifier(byte[] identifier) {
-        return new String(Base64.encodeBase64(identifier),
-                Charset.defaultCharset());
+        return new String(Base64.encodeBase64(identifier), Charsets.UTF_8);
     }
 
     static String getSecretKey(Map conf) {


Mime
View raw message