Fix IOOB in Verification.fromString()

This commit is contained in:
Paul Schaub 2023-04-09 19:51:49 +02:00
parent 5d04bb965b
commit f5e34bce6c
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -38,6 +38,13 @@ public class Verification {
throw new IllegalArgumentException("Verification must be of the format 'UTC-DATE OpenPGPFingerprint OpenPGPFingerprint'");
}
if (split.length == 3) {
return new Verification(UTCUtil.parseUTCDate(split[0]),
split[1], // key FP
split[2] // cert FP
);
}
SignatureMode mode = null;
int index = 3;
if (split[index].startsWith(MODE)) {