Skip to content

Commit 7068561

Browse files
committedFeb 12, 2025
apply 229
1 parent f76238e commit 7068561

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed
 

‎core/java/src/net/i2p/data/KeysAndCert.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,11 @@ public boolean equals(Object object) {
258258
return
259259
DataHelper.eq(_signingKey, ident._signingKey)
260260
&& DataHelper.eq(_publicKey, ident._publicKey)
261-
&& Arrays.equals(_padding, ident._padding)
262-
&& DataHelper.eq(_certificate, ident._certificate);
261+
&& DataHelper.eq(_certificate, ident._certificate)
262+
&& (Arrays.equals(_padding, ident._padding) ||
263+
// failsafe as some code paths may not compress padding
264+
((_paddingBlocks > 1 || ident._paddingBlocks > 1) &&
265+
Arrays.equals(getPadding(), ident.getPadding())));
263266
}
264267

265268
/** the signing key has enough randomness in it to use it by itself for speed */

0 commit comments

Comments
 (0)