1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

Fixed aegypten bug 372

This commit is contained in:
Werner Koch 2006-10-17 07:39:21 +00:00
parent 416ac2e4d7
commit 751f009c65
2 changed files with 19 additions and 11 deletions

View File

@ -1,3 +1,8 @@
2006-10-17 Werner Koch <wk@g10code.com>
* sign.c (gpgsm_get_default_cert): Changed to return only
certificates usable for signing.
2006-10-16 Werner Koch <wk@g10code.com> 2006-10-16 Werner Koch <wk@g10code.com>
* certchain.c (already_asked_marktrusted) * certchain.c (already_asked_marktrusted)

View File

@ -124,8 +124,8 @@ hash_and_copy_data (int fd, gcry_md_hd_t md, ksba_writer_t writer)
} }
/* Get the default certificate which is defined as the first one our /* Get the default certificate which is defined as the first cabable
keyDB returns and has a secret key available. */ of signing our keyDB returns and has a secret key available. */
int int
gpgsm_get_default_cert (ctrl_t ctrl, ksba_cert_t *r_cert) gpgsm_get_default_cert (ctrl_t ctrl, ksba_cert_t *r_cert)
{ {
@ -154,6 +154,8 @@ gpgsm_get_default_cert (ctrl_t ctrl, ksba_cert_t *r_cert)
return rc; return rc;
} }
if (!gpgsm_cert_use_sign_p (cert))
{
p = gpgsm_get_keygrip_hexstring (cert); p = gpgsm_get_keygrip_hexstring (cert);
if (p) if (p)
{ {
@ -166,6 +168,7 @@ gpgsm_get_default_cert (ctrl_t ctrl, ksba_cert_t *r_cert)
} }
xfree (p); xfree (p);
} }
}
ksba_cert_release (cert); ksba_cert_release (cert);
cert = NULL; cert = NULL;