mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-20 22:38:05 +01:00
Handle exceptions thrown when checking pre-key signatures
This commit is contained in:
committed by
Jon Chambers
parent
8cb83fb6e4
commit
540550d72a
@@ -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