mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01: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
10
sm/ChangeLog
10
sm/ChangeLog
@ -1,3 +1,13 @@
|
||||
2003-12-16 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* 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.
|
||||
|
||||
2003-12-15 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* encrypt.c (init_dek): Use gry_create_nonce for the IV; there is
|
||||
|
@ -135,7 +135,7 @@ same_subject_issuer (const char *subject, const char *issuer, KsbaCert cert)
|
||||
|
||||
/* Add a certificate to a list of certificate and make sure that it is
|
||||
a valid certificate. With SECRET set to true a secret key must be
|
||||
avaibale for the certificate. */
|
||||
available for the certificate. */
|
||||
int
|
||||
gpgsm_add_to_certlist (CTRL ctrl, const char *name, int secret,
|
||||
CERTLIST *listaddr)
|
||||
@ -190,7 +190,7 @@ gpgsm_add_to_certlist (CTRL ctrl, const char *name, int secret,
|
||||
|
||||
}
|
||||
}
|
||||
/* we want the error code from the first match in this case */
|
||||
/* We want the error code from the first match in this case. */
|
||||
if (rc && wrong_usage)
|
||||
rc = wrong_usage;
|
||||
|
||||
|
@ -44,7 +44,8 @@ enum cmd_and_opt_values {
|
||||
aDecrypt = 'd',
|
||||
aEncr = 'e',
|
||||
oInteractive = 'i',
|
||||
oKOption = 'k',
|
||||
aListKeys = 'k',
|
||||
aListSecretKeys = 'K',
|
||||
oDryRun = 'n',
|
||||
oOutput = 'o',
|
||||
oQuiet = 'q',
|
||||
@ -68,10 +69,8 @@ enum cmd_and_opt_values {
|
||||
aImport,
|
||||
aVerify,
|
||||
aVerifyFiles,
|
||||
aListKeys,
|
||||
aListExternalKeys,
|
||||
aListSigs,
|
||||
aListSecretKeys,
|
||||
aSendKeys,
|
||||
aRecvKeys,
|
||||
aExport,
|
||||
@ -695,7 +694,11 @@ main ( int argc, char **argv)
|
||||
*/
|
||||
|
||||
ksba_set_malloc_hooks (gcry_malloc, gcry_realloc, gcry_free );
|
||||
|
||||
assuan_set_malloc_hooks (gcry_malloc, gcry_realloc, gcry_free);
|
||||
assuan_set_assuan_log_stream (log_get_stream ());
|
||||
assuan_set_assuan_log_prefix (log_get_prefix (NULL));
|
||||
|
||||
keybox_set_malloc_hooks (gcry_malloc, gcry_realloc, gcry_free);
|
||||
|
||||
/* Setup a default control structure for command line mode */
|
||||
|
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…
x
Reference in New Issue
Block a user