This is an automated email from the ASF dual-hosted git repository.

pradeep pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ranger.git


The following commit(s) were added to refs/heads/master by this push:
     new d32b3abfb RANGER-5430:Handling Invalid cipher AES issues in UT (#781)
d32b3abfb is described below

commit d32b3abfb481f8eb1343cd7c3c98e8458a062d0a
Author: Chinmay Hegde <[email protected]>
AuthorDate: Fri Jan 2 15:04:29 2026 +0530

    RANGER-5430:Handling Invalid cipher AES issues in UT (#781)
---
 .../crypto/key/kms/server/RangerKeyStoreProviderTest.java    | 12 ------------
 1 file changed, 12 deletions(-)

diff --git 
a/kms/src/test/java/org/apache/hadoop/crypto/key/kms/server/RangerKeyStoreProviderTest.java
 
b/kms/src/test/java/org/apache/hadoop/crypto/key/kms/server/RangerKeyStoreProviderTest.java
index 68fd15f5e..bf183fbfc 100644
--- 
a/kms/src/test/java/org/apache/hadoop/crypto/key/kms/server/RangerKeyStoreProviderTest.java
+++ 
b/kms/src/test/java/org/apache/hadoop/crypto/key/kms/server/RangerKeyStoreProviderTest.java
@@ -126,7 +126,6 @@ public void testCreateDeleteKey() throws Throwable {
         // Create a key
         Options options = new Options(conf);
         options.setBitLength(128);
-        options.setCipher("AES");
         KeyVersion keyVersion = keyProvider.createKey("newkey1", options);
         Assertions.assertEquals("newkey1", keyVersion.getName());
         Assertions.assertEquals(128 / 8, keyVersion.getMaterial().length);
@@ -190,7 +189,6 @@ public void testCreateKey() throws Throwable {
         // Create a key
         Options options = new Options(conf);
         options.setBitLength(256);
-        options.setCipher("AES");
         KeyVersion keyVersion = keyProvider.createKey("newkey1", options);
         Assertions.assertEquals("newkey1", keyVersion.getName());
         Assertions.assertEquals(256 / 8, keyVersion.getMaterial().length);
@@ -220,7 +218,6 @@ public void testRolloverKey() throws Throwable {
         // Create a key
         Options options = new Options(conf);
         options.setBitLength(192);
-        options.setCipher("AES");
         KeyVersion keyVersion = keyProvider.createKey("newkey1", options);
         Assertions.assertEquals("newkey1", keyVersion.getName());
         Assertions.assertEquals(192 / 8, keyVersion.getMaterial().length);
@@ -264,7 +261,6 @@ public void testGetKeyVersion() throws Throwable {
         // Create a key version
         Options options = new Options(conf);
         options.setBitLength(192);
-        options.setCipher("AES");
         KeyVersion keyVersion = keyProvider.createKey("newkey1", options);
 
         Assertions.assertEquals("newkey1", keyVersion.getName());
@@ -315,7 +311,6 @@ public void testGetKeys() throws Throwable {
         // Create a key version
         Options options = new Options(conf);
         options.setBitLength(192);
-        options.setCipher("AES");
         KeyVersion keyVersion = keyProvider.createKey("newkey1", options);
 
         Assertions.assertEquals("newkey1", keyVersion.getName());
@@ -370,7 +365,6 @@ public void testGetKeyVersionWithInvalidVersion() throws 
Throwable {
         // Create a key version
         Options options = new Options(conf);
         options.setBitLength(192);
-        options.setCipher("AES");
         KeyVersion keyVersion = keyProvider.createKey("newkey1", options);
 
         Assertions.assertEquals("newkey1", keyVersion.getName());
@@ -404,7 +398,6 @@ public void testGetKeyVersions() throws Throwable {
         // Create a key version
         Options options = new Options(conf);
         options.setBitLength(192);
-        options.setCipher("AES");
         KeyVersion keyVersion = keyProvider.createKey("newkey1", options);
 
         Assertions.assertEquals("newkey1", keyVersion.getName());
@@ -439,7 +432,6 @@ public void testGetMetadata() throws Throwable {
         // Create a key version
         Options options = new Options(conf);
         options.setBitLength(192);
-        options.setCipher("AES");
         KeyVersion keyVersion = keyProvider.createKey("newkey1", options);
         Assertions.assertEquals("newkey1", keyVersion.getName());
         Assertions.assertEquals(192 / 8, keyVersion.getMaterial().length);
@@ -492,7 +484,6 @@ public void testFlush() throws Throwable {
         // Create a key version
         Options options = new Options(conf);
         options.setBitLength(192);
-        options.setCipher("AES");
         KeyVersion keyVersion = keyProvider.createKey("newkey1", options);
 
         Assertions.assertEquals("newkey1", keyVersion.getName());
@@ -602,7 +593,6 @@ public void 
testRollNewVersion_ThrowsWhenKeyLengthMismatch() throws Throwable {
 
         Options options = new Options(conf);
         options.setBitLength(128);
-        options.setCipher("AES");
         provider.createKey("testKeyMismatch", options);
         provider.flush();
 
@@ -964,7 +954,6 @@ void 
testCreateKey_ShouldThrowIOException_WhenKeyAlreadyExists() throws Throwabl
         String keyName  = "existingKey";
         byte[] material = new byte[16]; // 128 bits
         KeyProvider.Options options = new KeyProvider.Options(conf)
-                .setCipher("AES")
                 .setBitLength(128);
 
         // Simulate that key already exists
@@ -989,7 +978,6 @@ void 
testCreateKey_ShouldThrowIOException_WhenKeyLengthIncorrect() throws Throwa
         String keyName  = "newKey";
         byte[] material = new byte[10]; // 80 bits
         KeyProvider.Options options = new KeyProvider.Options(conf)
-                .setCipher("AES")
                 .setBitLength(128); // But expects 128 bits
 
         // Simulate key does not exist

Reply via email to