bc-java
bc-java copied to clipboard
Fix unpacking time (unsigned int) from octets for large values
Time, as well as offsets (e.g. expiration) in OpenPGP are stored as seconds in unsigned Integers.
I noticed, that https://github.com/bcgit/bc-java/commit/8385a2ca13573435a64d6bd96769c97e2e9edee8 broke some tests in PGPainless that dealt with large expiration time intervals.
Turns out, the changed code accidentally converted the values to signed ints, which break for large (but legal) intervals.
The patch converts back to an unsigned value.