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:
parent
416ac2e4d7
commit
751f009c65
@ -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)
|
||||||
|
25
sm/sign.c
25
sm/sign.c
@ -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)
|
||||||
{
|
{
|
||||||
@ -153,20 +153,23 @@ gpgsm_get_default_cert (ctrl_t ctrl, ksba_cert_t *r_cert)
|
|||||||
keydb_release (hd);
|
keydb_release (hd);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
p = gpgsm_get_keygrip_hexstring (cert);
|
if (!gpgsm_cert_use_sign_p (cert))
|
||||||
if (p)
|
|
||||||
{
|
{
|
||||||
if (!gpgsm_agent_havekey (ctrl, p))
|
p = gpgsm_get_keygrip_hexstring (cert);
|
||||||
|
if (p)
|
||||||
{
|
{
|
||||||
|
if (!gpgsm_agent_havekey (ctrl, p))
|
||||||
|
{
|
||||||
|
xfree (p);
|
||||||
|
keydb_release (hd);
|
||||||
|
*r_cert = cert;
|
||||||
|
return 0; /* got it */
|
||||||
|
}
|
||||||
xfree (p);
|
xfree (p);
|
||||||
keydb_release (hd);
|
|
||||||
*r_cert = cert;
|
|
||||||
return 0; /* got it */
|
|
||||||
}
|
}
|
||||||
xfree (p);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ksba_cert_release (cert);
|
ksba_cert_release (cert);
|
||||||
cert = NULL;
|
cert = NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user