Github user joshelser commented on a diff in the pull request:
https://github.com/apache/accumulo/pull/163#discussion_r82929101
--- Diff:
core/src/main/java/org/apache/accumulo/core/security/crypto/NonCachingSecretKeyEncryptionStrategy.java
---
@@ -81,7 +81,10 @@ private void doKeyEncryptionOperation(int
encryptionMode, CryptoModuleParameters
Cipher cipher =
DefaultCryptoModuleUtils.getCipher(params.getAllOptions().get(Property.CRYPTO_DEFAULT_KEY_STRATEGY_CIPHER_SUITE.getKey()));
try {
- cipher.init(encryptionMode, new SecretKeySpec(keyEncryptionKey,
params.getAlgorithmName()));
+ if (keyEncryptionKey.length > 0)
--- End diff --
It looks like this change might actually change the code flow. When the
keyEncryptionKey was of length `0`, would `cipher.init(...)` have thrown an
`InvalidKeyException`? I would assume that when the key is empty, we would want
to throw a `RuntimeException`.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---