1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-25 22:02:05 +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() { private fun processOnePassSignature() {
syntaxVerifier.next(InputSymbol.ONE_PASS_SIGNATURE) syntaxVerifier.next(InputSymbol.ONE_PASS_SIGNATURE)
val ops = packetInputStream!!.readOnePassSignature() val ops =
LOGGER.debug( try {
"One-Pass-Signature Packet by key ${ops.keyID.openPgpKeyId()} at depth ${layerMetadata.depth} encountered.") packetInputStream!!.readOnePassSignature()
} catch (e: UnsupportedPacketVersionException) {
LOGGER.debug("Unsupported One-Pass-Signature packet version encountered.", e)
return
}
signatures.addOnePassSignature(ops) signatures.addOnePassSignature(ops)
} }