1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-17 09:52:06 +01:00

Catch UnsupportedPacketVersionExceptions when parsing OnePassSignaturePackets

This commit is contained in:
Paul Schaub 2024-06-12 22:11:47 +02:00
parent e9c57a9ed9
commit 0045f77551
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -197,9 +197,13 @@ class OpenPgpMessageInputStream(
private fun processOnePassSignature() {
syntaxVerifier.next(InputSymbol.ONE_PASS_SIGNATURE)
val ops = packetInputStream!!.readOnePassSignature()
LOGGER.debug(
"One-Pass-Signature Packet by key ${ops.keyID.openPgpKeyId()} at depth ${layerMetadata.depth} encountered.")
val ops =
try {
packetInputStream!!.readOnePassSignature()
} catch (e: UnsupportedPacketVersionException) {
LOGGER.debug("Unsupported One-Pass-Signature packet version encountered.", e)
return
}
signatures.addOnePassSignature(ops)
}