bc-java icon indicating copy to clipboard operation
bc-java copied to clipboard

Fix unpacking time (unsigned int) from octets for large values

Open vanitasvitae opened this issue 5 months ago • 3 comments

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.

vanitasvitae avatar Sep 14 '24 09:09 vanitasvitae