diff --git a/core/java/src/net/i2p/data/KeysAndCert.java b/core/java/src/net/i2p/data/KeysAndCert.java index 85e0f90aa8271a468411db34a55481025af64b4d..74b792dff6f04a9e35e949fc5d8b9ea9433be4dd 100644 --- a/core/java/src/net/i2p/data/KeysAndCert.java +++ b/core/java/src/net/i2p/data/KeysAndCert.java @@ -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 */