mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
sm: Avoid confusing diagnostic for the default key.
* sm/certlist.c (cert_usage_p): Add arg 'silent' and change all callers. (gpgsm_cert_use_sign_p): Add arg 'silent' and pass to cert_usage_p. Change all callers. * sm/sign.c (gpgsm_get_default_cert): Set SILENT when calling gpgsm_cert_use_sign_p -- GnuPG-bug-id: 4535 Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
b6289af973
commit
521e7d4644
3 changed files with 29 additions and 24 deletions
|
@ -161,7 +161,7 @@ gpgsm_get_default_cert (ctrl_t ctrl, ksba_cert_t *r_cert)
|
|||
return rc;
|
||||
}
|
||||
|
||||
if (!gpgsm_cert_use_sign_p (cert))
|
||||
if (!gpgsm_cert_use_sign_p (cert, 1))
|
||||
{
|
||||
p = gpgsm_get_keygrip_hexstring (cert);
|
||||
if (p)
|
||||
|
@ -504,7 +504,7 @@ gpgsm_sign (ctrl_t ctrl, certlist_t signerlist,
|
|||
|
||||
/* Although we don't check for ambiguous specification we will
|
||||
check that the signer's certificate is usable and valid. */
|
||||
rc = gpgsm_cert_use_sign_p (cert);
|
||||
rc = gpgsm_cert_use_sign_p (cert, 0);
|
||||
if (!rc)
|
||||
rc = gpgsm_validate_chain (ctrl, cert, "", NULL, 0, NULL, 0, NULL);
|
||||
if (rc)
|
||||
|
@ -613,7 +613,7 @@ gpgsm_sign (ctrl_t ctrl, certlist_t signerlist,
|
|||
/* Gather certificates of signers and store them in the CMS object. */
|
||||
for (cl=signerlist; cl; cl = cl->next)
|
||||
{
|
||||
rc = gpgsm_cert_use_sign_p (cl->cert);
|
||||
rc = gpgsm_cert_use_sign_p (cl->cert, 0);
|
||||
if (rc)
|
||||
goto leave;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue