vikaskr22 commented on code in PR #680:
URL: https://github.com/apache/ranger/pull/680#discussion_r2731766356


##########
kms/src/main/java/org/apache/hadoop/crypto/key/RangerHSM.java:
##########
@@ -155,7 +158,7 @@ public boolean setMasterKey(String password, byte[] key) {
             try {
                 Key aesKey = new SecretKeySpec(key, MK_CIPHER);
 
-                myStore.setKeyEntry(ALIAS, aesKey, password.toCharArray(), 
(java.security.cert.Certificate[]) null);
+                myStore.setKeyEntry(alias, aesKey, password.toCharArray(), 
(java.security.cert.Certificate[]) null);

Review Comment:
   @ChinmayHegde24 , it's not related to your change. But it would be better 
add one check to verify if the key alias already exists or not , the way we 
check in generateMasterKey() method.
   
   @dhavalshah9131 , is there any reason there is no check for key existence ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to