File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
llap-common/src/java/org/apache/hadoop/hive/llap/security Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1818package org .apache .hadoop .hive .llap .security ;
1919
2020import java .io .IOException ;
21- import java .util . Arrays ;
21+ import java .security . MessageDigest ;
2222
2323import org .apache .hadoop .conf .Configuration ;
2424import org .apache .hadoop .security .UserGroupInformation ;
@@ -58,7 +58,9 @@ public SignedMessage serializeAndSign(Signable message) throws IOException {
5858 public void checkSignature (byte [] message , byte [] signature , int keyId )
5959 throws SecurityException {
6060 byte [] expectedSignature = secretManager .signWithKey (message , keyId );
61- if (Arrays .equals (signature , expectedSignature )) return ;
61+ if (MessageDigest .isEqual (signature , expectedSignature )) {
62+ return ;
63+ }
6264 throw new SecurityException ("Message signature does not match" );
6365 }
6466
You can’t perform that action at this time.
0 commit comments