gpg: Implemented latest rfc4880bis version 5 packet hashing.
authorWerner Koch <wk@gnupg.org>
Tue, 12 Mar 2019 10:09:52 +0000 (11:09 +0100)
committerWerner Koch <wk@gnupg.org>
Thu, 14 Mar 2019 10:26:54 +0000 (11:26 +0100)
commita21ca3a1eff4722dea778cca4abe14a873ccebdf
tree265f61e68d4abd838bdef616514d781af820b3b0
parentf199b627ce512c8495af5c9bd1c81127ccde3ca0
gpg: Implemented latest rfc4880bis version 5 packet hashing.

* configure.ac (AC_CHECK_SIZEOF): Test size_t.
* g10/sig-check.c (check_signature_end_simple): Support v5 signatures
as per current rfc4880bis.  For correctness also allow for N > 2^32.
* g10/sign.c (pt_extra_hash_data_t): New.
(hash_sigversion_to_magic): New arg EXTRAHASH.
(write_plaintext_packet): New arg R_EXTRAHASH.
(write_signature_packets): Pass EXTRAHASH.
(sign_file): Ditto.
(sign_symencrypt_file): Ditto.
--

Take care: The code path for v5 sigs has not yet been tested.

Signed-off-by: Werner Koch <wk@gnupg.org>
configure.ac
g10/sig-check.c
g10/sign.c