1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

Add gpgconf related dummy options default_pubkey_algo.

Add option --skip-hidden-recipients
Comment updates.
This commit is contained in:
Werner Koch 2009-11-23 19:18:04 +00:00
parent 5741eace29
commit cf2ec5673f
12 changed files with 71 additions and 3 deletions

View file

@ -1,3 +1,13 @@
2009-11-23 Werner Koch <wk@g10code.com>
* gpg.c (gpgconf_list): Add key "default_pubkey_algo".
2009-11-18 Werner Koch <wk@g10code.com>
* gpg.c: Add option --skip-hidden-recipients and no- variant.
* options.h (struct opt): Add field SKIP_HIDDEN_RECIPIENTS.
* pubkey-enc.c (get_session_key): Implement that option.
2009-11-04 Werner Koch <wk@g10code.com>
* server.c (register_commands): Add NULL arg to

View file

@ -233,6 +233,8 @@ enum cmd_and_opt_values
oWithSigList,
oWithSigCheck,
oSkipVerify,
oSkipHiddenRecipients,
oNoSkipHiddenRecipients,
oCompressKeys,
oCompressSigs,
oAlwaysTrust,
@ -626,6 +628,8 @@ static ARGPARSE_OPTS opts[] = {
ARGPARSE_s_n (aListSigs, "list-sig", "@"), /* alias */
ARGPARSE_s_n (aCheckKeys, "check-sig", "@"), /* alias */
ARGPARSE_s_n (oSkipVerify, "skip-verify", "@"),
ARGPARSE_s_n (oSkipHiddenRecipients, "skip-hidden-recipients", "@"),
ARGPARSE_s_n (oNoSkipHiddenRecipients, "no-skip-hidden-recipients", "@"),
ARGPARSE_s_n (oCompressKeys, "compress-keys", "@"),
ARGPARSE_s_n (oCompressSigs, "compress-sigs", "@"),
ARGPARSE_s_i (oDefCertLevel, "default-cert-check-level", "@"), /* old */
@ -1586,6 +1590,11 @@ gpgconf_list (const char *configfile)
printf ("debug-level:%lu:\"none:\n", GC_OPT_FLAG_DEFAULT);
printf ("group:%lu:\n", GC_OPT_FLAG_NONE);
/* The next one is an info only item and should match what
keygen:ask_keysize actually implements. */
printf ("default_pubkey_algo:%lu:\"%s:\n", GC_OPT_FLAG_DEFAULT,
"RSA-2048");
xfree (configfile_esc);
}
@ -2315,6 +2324,10 @@ main (int argc, char **argv)
case oWithSigList: opt.list_sigs = 1; break;
case oSkipVerify: opt.skip_verify=1; break;
case oSkipHiddenRecipients: opt.skip_hidden_recipients = 1; break;
case oNoSkipHiddenRecipients: opt.skip_hidden_recipients = 0; break;
case oCompressKeys: opt.compress_keys = 1; break;
case aListSecretKeys: set_cmd( &cmd, aListSecretKeys); break;
/* There are many programs (like mutt) that call gpg with

View file

@ -1765,6 +1765,8 @@ ask_algo (int addmode, int *r_subkey_algo, unsigned int *r_usage)
static unsigned
ask_keysize (int algo, unsigned int primary_keysize)
{
/* NOTE: If you change the default key size/algo, remember to change
it also in gpgconf.c:gpgconf_list. */
unsigned int nbits, min, def=2048, max=4096;
int for_subkey = !!primary_keysize;
int autocomp = 0;

View file

@ -94,6 +94,7 @@ struct
char *lc_messages;
int skip_verify;
int skip_hidden_recipients;
int compress_keys;
int compress_sigs;
/* TM_CLASSIC must be zero to accomodate trustdbs generated before

View file

@ -85,6 +85,8 @@ get_session_key( PKT_pubkey_enc *k, DEK *dek )
if( !(rc = get_seckey( sk, k->keyid )) )
rc = get_it( k, dek, sk, k->keyid );
}
else if (opt.skip_hidden_recipients)
rc = gpg_error (GPG_ERR_NO_SECKEY);
else { /* anonymous receiver: Try all available secret keys */
void *enum_context = NULL;
u32 keyid[2];