HDFS-7181. Remove incorrect precondition check on key length in FileEncryptionInfo. (wang)
This commit is contained in:
parent
d2d5a0ea03
commit
6ac10516e7
|
@ -73,16 +73,6 @@ public enum CipherSuite {
|
||||||
return builder.toString();
|
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
|
* Convert to CipherSuite from name, {@link #algoBlockSize} is fixed for
|
||||||
* certain cipher suite, just need to compare the name.
|
* certain cipher suite, just need to compare the name.
|
||||||
|
|
|
@ -58,8 +58,6 @@ public class FileEncryptionInfo {
|
||||||
checkNotNull(iv);
|
checkNotNull(iv);
|
||||||
checkNotNull(keyName);
|
checkNotNull(keyName);
|
||||||
checkNotNull(ezKeyVersionName);
|
checkNotNull(ezKeyVersionName);
|
||||||
checkArgument(edek.length == suite.getAlgorithmBlockSize(),
|
|
||||||
"Unexpected key length");
|
|
||||||
checkArgument(iv.length == suite.getAlgorithmBlockSize(),
|
checkArgument(iv.length == suite.getAlgorithmBlockSize(),
|
||||||
"Unexpected IV length");
|
"Unexpected IV length");
|
||||||
this.cipherSuite = suite;
|
this.cipherSuite = suite;
|
||||||
|
|
|
@ -903,6 +903,9 @@ Release 2.6.0 - UNRELEASED
|
||||||
HDFS-7179. DFSClient should instantiate a KeyProvider, not a
|
HDFS-7179. DFSClient should instantiate a KeyProvider, not a
|
||||||
KeyProviderCryptoExtension. (wang)
|
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
|
BREAKDOWN OF HDFS-6134 AND HADOOP-10150 SUBTASKS AND RELATED JIRAS
|
||||||
|
|
||||||
HDFS-6387. HDFS CLI admin tool for creating & deleting an
|
HDFS-6387. HDFS CLI admin tool for creating & deleting an
|
||||||
|
|
Loading…
Reference in New Issue