Handle exceptions thrown when checking pre-key signatures
This commit is contained in:
parent
8cb83fb6e4
commit
540550d72a
|
@ -12,6 +12,10 @@ public interface SignedPreKey<K> extends PreKey<K> {
|
||||||
byte[] signature();
|
byte[] signature();
|
||||||
|
|
||||||
default boolean signatureValid(final IdentityKey identityKey) {
|
default boolean signatureValid(final IdentityKey identityKey) {
|
||||||
return identityKey.getPublicKey().verifySignature(serializedPublicKey(), signature());
|
try {
|
||||||
|
return identityKey.getPublicKey().verifySignature(serializedPublicKey(), signature());
|
||||||
|
} catch (final Exception e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue