Data: Fix KeysAndCert.equals()

This commit is contained in:
zzz
2025-02-11 21:22:14 +00:00
parent 538cb52ed3
commit 198f89bc50
+5 -2
View File
@@ -267,8 +267,11 @@ public class KeysAndCert extends DataStructureImpl {
return
DataHelper.eq(_signingKey, ident._signingKey)
&& DataHelper.eq(_publicKey, ident._publicKey)
&& Arrays.equals(_padding, ident._padding)
&& DataHelper.eq(_certificate, ident._certificate);
&& DataHelper.eq(_certificate, ident._certificate)
&& (Arrays.equals(_padding, ident._padding) ||
// failsafe as some code paths may not compress padding
((_paddingBlocks > 1 || ident._paddingBlocks > 1) &&
Arrays.equals(getPadding(), ident.getPadding())));
}
/** the signing key has enough randomness in it to use it by itself for speed */