mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
* gpgsm.c (main): Set the prefixes for assuan logging.
* sign.c (gpgsm_sign): Add validation checks for the default certificate. * gpgsm.c: Add -k as alias for --list-keys and -K for --list-secret-keys.
This commit is contained in:
parent
f438224dae
commit
a41d45af62
4 changed files with 30 additions and 6 deletions
13
sm/sign.c
13
sm/sign.c
|
@ -124,7 +124,7 @@ hash_and_copy_data (int fd, gcry_md_hd_t md, KsbaWriter writer)
|
|||
|
||||
|
||||
/* Get the default certificate which is defined as the first one our
|
||||
keyDB retruns and has a secret key available */
|
||||
keyDB returns and has a secret key available. */
|
||||
int
|
||||
gpgsm_get_default_cert (KsbaCert *r_cert)
|
||||
{
|
||||
|
@ -364,6 +364,17 @@ gpgsm_sign (CTRL ctrl, CERTLIST signerlist,
|
|||
rc = gpg_error (GPG_ERR_GENERAL);
|
||||
goto leave;
|
||||
}
|
||||
|
||||
/* Although we don't check for ambigious specification we will
|
||||
check that the signer's certificate is is usable and
|
||||
valid. */
|
||||
rc = gpgsm_cert_use_sign_p (cert);
|
||||
if (!rc)
|
||||
rc = gpgsm_validate_chain (ctrl, cert, NULL);
|
||||
if (rc)
|
||||
goto leave;
|
||||
|
||||
/* That one is fine - create signerlist. */
|
||||
signerlist = xtrycalloc (1, sizeof *signerlist);
|
||||
if (!signerlist)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue