Closed juanpmarin closed 1 year ago
Oops, you're right. Bulk-updating exception specs and got this one wrong!
Wait, no, sorry. The keys are validated lazily if you load the record from the serialized form. Maybe they should be validated eagerly, but they currently aren't.
thanks for the reply! it would be amazing if they are validated eagerly.
I'll keep this issue open for that. It's an extra up-front, non-optimizable check, but there's not much point in a PreKeyRecord with invalid data.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been closed due to inactivity.
https://github.com/signalapp/libsignal/blob/ba47c9d681eefdf9196e8d708e67549ac1301364/java/shared/java/org/signal/libsignal/protocol/state/PreKeyRecord.java#L44
As you can see there, the getKeyPair has a checked InvalidKeyException, it is not necessary as the keys are already validated and it gets very annoying to catch this exception every time I access the pre key