diff options
author | Werner Koch <[email protected]> | 2004-01-30 09:12:36 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2004-01-30 09:12:36 +0000 |
commit | fec4dc4c99e1a1eb12b99a5bbc9d995a93bd5227 (patch) | |
tree | 470f5a58351c2c70138686b800dd652dfe876f39 /sm/sign.c | |
parent | New. (diff) | |
download | gnupg-fec4dc4c99e1a1eb12b99a5bbc9d995a93bd5227.tar.gz gnupg-fec4dc4c99e1a1eb12b99a5bbc9d995a93bd5227.zip |
* configure.ac: Require libksba 0.9.3 due to another bug fix there.
* sign.c (add_certificate_list): Decrement N for the first cert.
* Makefile.am (sbin_SCRIPTS): New, to install addgnupghome.
(EXTRA_DIST): Added rfc822parse.c rfc822parse.h gpgparsemail.c
which might be useful for debugging.
Diffstat (limited to 'sm/sign.c')
-rw-r--r-- | sm/sign.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -244,6 +244,7 @@ add_certificate_list (CTRL ctrl, ksba_cms_t cms, ksba_cert_t cert) ksba_cert_ref (cert); n = ctrl->include_certs; + log_debug ("adding certificates at level %d\n", n); if (n == -2) { not_root = 1; @@ -252,6 +253,8 @@ add_certificate_list (CTRL ctrl, ksba_cms_t cms, ksba_cert_t cert) if (n < 0 || n > 50) n = 50; /* We better apply an upper bound */ + /* First add my own certificate unless we don't want any certificate + included at all. */ if (n) { if (not_root && gpgsm_is_root_cert (cert)) @@ -260,7 +263,12 @@ add_certificate_list (CTRL ctrl, ksba_cms_t cms, ksba_cert_t cert) err = ksba_cms_add_cert (cms, cert); if (err) goto ksba_failure; + if (n>0) + n--; } + /* Walk the chain to include all other certificates. Note that a -1 + used for N makes sure that there is no limit and all certs get + included. */ while ( n-- && !(rc = gpgsm_walk_cert_chain (cert, &next)) ) { if (not_root && gpgsm_is_root_cert (next)) |