mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-16 01:12:05 +01:00
Backport 74c7b025a0
Do not choke on unknown signature subpackets Fixes #418
This commit is contained in:
parent
4f85a29e0c
commit
38db67df80
1 changed files with 7 additions and 1 deletions
|
@ -35,7 +35,13 @@ public class SignatureSubpacketsHelper {
|
||||||
|
|
||||||
public static SignatureSubpackets applyFrom(PGPSignatureSubpacketVector vector, SignatureSubpackets subpackets) {
|
public static SignatureSubpackets applyFrom(PGPSignatureSubpacketVector vector, SignatureSubpackets subpackets) {
|
||||||
for (SignatureSubpacket subpacket : vector.toArray()) {
|
for (SignatureSubpacket subpacket : vector.toArray()) {
|
||||||
org.pgpainless.algorithm.SignatureSubpacket type = org.pgpainless.algorithm.SignatureSubpacket.requireFromCode(subpacket.getType());
|
org.pgpainless.algorithm.SignatureSubpacket type = org.pgpainless.algorithm.SignatureSubpacket.fromCode(subpacket.getType());
|
||||||
|
if (type == null) {
|
||||||
|
// Unknown subpacket, ignore and just add to the residuals
|
||||||
|
subpackets.addResidualSubpacket(subpacket);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case signatureCreationTime:
|
case signatureCreationTime:
|
||||||
case issuerKeyId:
|
case issuerKeyId:
|
||||||
|
|
Loading…
Reference in a new issue