rnp icon indicating copy to clipboard operation
rnp copied to clipboard

Make one-pass signature reading more relaxed.

Open ni4 opened this issue 2 years ago • 1 comments

Description

Currently if we have multiple one-pass signatures we stop on the first one with nested=1. This results in the following messages in the log:

[signed_read_single_signature() /Users/nickolay/Ribose/rnp/src/librepgp/stream-parse.cpp:956] failed to read signature packet header
[signed_read_signatures() /Users/nickolay/Ribose/rnp/src/librepgp/stream-parse.cpp:1027] Warning: premature end of signatures
[signed_src_finish() /Users/nickolay/Ribose/rnp/src/librepgp/stream-parse.cpp:1057] warning: unexpected data on the stream end

However, GnuPG allows such case, so we should also change our behaviour (maybe issuing just a single warning). The main usecase for this is multiple-user signing of the document/re-signing of the documents.

ni4 avatar Apr 18 '22 13:04 ni4

Additionally, we may check whether document is already signed (includes one-pass signature packets at the beginning), and update their nested field (one-pass signature packet is not hashed).

ni4 avatar Jun 24 '22 09:06 ni4