mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-02 12:46:53 +00:00
Handle exceptions thrown when checking pre-key signatures
This commit is contained in:
1 parent
8cb83fb6e4
commit
540550d72a
1 file changed
+5
-1
@@ -12,6 +12,10 @@ public interface SignedPreKey<K> extends PreKey<K> {
|
||||
byte[] signature();
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user