You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by st...@apache.org on 2014/10/10 21:01:04 UTC

[25/50] [abbrv] git commit: HDFS-7181. Remove incorrect precondition check on key length in FileEncryptionInfo. (wang)

HDFS-7181. Remove incorrect precondition check on key length in FileEncryptionInfo. (wang)

(cherry picked from commit 6ac10516e7fa28384b6d3c2670f6621e2666ffdb)
(cherry picked from commit 6dbba19469d698891e9c6a8513cbe58992a736b1)


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

Branch: refs/heads/champlain
Commit: c0cf126a27c517f664a2b8ea410fbc93a6c1c5d3
Parents: 3ebbc99
Author: Andrew Wang <wa...@apache.org>
Authored: Thu Oct 2 13:51:08 2014 -0700
Committer: Jitendra Pandey <Ji...@Jitendra-Pandeys-MacBook-Pro-4.local>
Committed: Wed Oct 8 23:37:54 2014 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/hadoop/crypto/CipherSuite.java   | 10 ----------
 .../java/org/apache/hadoop/fs/FileEncryptionInfo.java     |  2 --
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt               |  3 +++
 3 files changed, 3 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/c0cf126a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CipherSuite.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CipherSuite.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CipherSuite.java
index 9962b38..c9355d7 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CipherSuite.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CipherSuite.java
@@ -73,16 +73,6 @@ public enum CipherSuite {
     return builder.toString();
   }
   
-  public static void checkName(String name) {
-    CipherSuite[] suites = CipherSuite.values();
-    for (CipherSuite suite : suites) {
-      if (suite.getName().equals(name)) {
-        return;
-      }
-    }
-    throw new IllegalArgumentException("Invalid cipher suite name: " + name);
-  }
-  
   /**
    * Convert to CipherSuite from name, {@link #algoBlockSize} is fixed for
    * certain cipher suite, just need to compare the name.

http://git-wip-us.apache.org/repos/asf/hadoop/blob/c0cf126a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileEncryptionInfo.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileEncryptionInfo.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileEncryptionInfo.java
index 27e0c85..00ddfe8 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileEncryptionInfo.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileEncryptionInfo.java
@@ -58,8 +58,6 @@ public class FileEncryptionInfo {
     checkNotNull(iv);
     checkNotNull(keyName);
     checkNotNull(ezKeyVersionName);
-    checkArgument(edek.length == suite.getAlgorithmBlockSize(),
-        "Unexpected key length");
     checkArgument(iv.length == suite.getAlgorithmBlockSize(),
         "Unexpected IV length");
     this.cipherSuite = suite;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/c0cf126a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index cf39e25..6427c80 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -544,6 +544,9 @@ Release 2.6.0 - UNRELEASED
     HDFS-7179. DFSClient should instantiate a KeyProvider, not a
     KeyProviderCryptoExtension. (wang)
 
+    HDFS-7181. Remove incorrect precondition check on key length in
+    FileEncryptionInfo. (wang)
+
     BREAKDOWN OF HDFS-6134 AND HADOOP-10150 SUBTASKS AND RELATED JIRAS
   
       HDFS-6387. HDFS CLI admin tool for creating & deleting an