diff options
| author | Werner Koch <[email protected]> | 2019-05-13 10:38:32 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2019-05-13 10:39:17 +0000 |
| commit | d07666412d4317460c6f03b3ffd03edf4a715ef7 (patch) | |
| tree | 3cb40ac32c45abe181769091b64726a9cb673dae /g10/gpgcompose.c | |
| parent | build: Update m4/iconv.m4. (diff) | |
| download | gnupg-d07666412d4317460c6f03b3ffd03edf4a715ef7.tar.gz gnupg-d07666412d4317460c6f03b3ffd03edf4a715ef7.zip | |
gpg: Cleanup use of make_keysig_packet.
* g10/sign.c (make_keysig_packet): Remove obsolete arg diegst_algo
which was always passed as 0. Change all callers.
* g10/gpgcompose.c (signature): Warn when trying to set a digest algo.
--
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'g10/gpgcompose.c')
| -rw-r--r-- | g10/gpgcompose.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/g10/gpgcompose.c b/g10/gpgcompose.c index e882fa8e3..9e6d51a57 100644 --- a/g10/gpgcompose.c +++ b/g10/gpgcompose.c @@ -1799,12 +1799,19 @@ signature (const char *option, int argc, char *argv[], void *cookie) keyid_copy (si.issuer_pk->keyid, pk_keyid (pripk)); } + /* The reuse of core gpg stuff by this tool is questionable when it + * requires adding extra code to the actual gpg code. It does not + * make sense to pass an extra parameter and in particular not given + * that gpg already has opt.cert_digest_algo to override it. */ + if (si.digest_algo) + log_info ("note: digest algo can't be passed to make_keysig_packet\n"); + /* Changing the issuer's key id is fragile. Check to make sure make_keysig_packet didn't recompute the keyid. */ keyid_copy (keyid, si.issuer_pk->keyid); err = make_keysig_packet (global_ctrl, &sig, si.pk, si.uid, si.sk, si.issuer_pk, - si.class, si.digest_algo, + si.class, si.timestamp, si.expiration, mksubpkt_callback, &si, NULL); log_assert (keyid_cmp (keyid, si.issuer_pk->keyid) == 0); |
