diff options
author | Werner Koch <[email protected]> | 2009-03-18 11:18:56 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2009-03-18 11:18:56 +0000 |
commit | a3b63ac1dc1084beb3d4350e10033ac4af43dcf5 (patch) | |
tree | 0eb716595b5d85872ecb006743847d99945639ea /sm | |
parent | Enhanced last patch. (diff) | |
download | gnupg-a3b63ac1dc1084beb3d4350e10033ac4af43dcf5.tar.gz gnupg-a3b63ac1dc1084beb3d4350e10033ac4af43dcf5.zip |
Add server option with-ephemeral-keys.
Extend SCD LEARN command.
Diffstat (limited to 'sm')
-rw-r--r-- | sm/ChangeLog | 8 | ||||
-rw-r--r-- | sm/gpgsm.c | 2 | ||||
-rw-r--r-- | sm/gpgsm.h | 5 | ||||
-rw-r--r-- | sm/keylist.c | 2 | ||||
-rw-r--r-- | sm/server.c | 5 |
5 files changed, 17 insertions, 5 deletions
diff --git a/sm/ChangeLog b/sm/ChangeLog index 03fa60c98..caf96eb80 100644 --- a/sm/ChangeLog +++ b/sm/ChangeLog @@ -1,3 +1,11 @@ +2009-03-18 Werner Koch <[email protected]> + + * gpgsm.h (struct opt): Move field WITH_EPHEMERAL_KEYS to struct + server_control_s. + * gpgsm.c (main): Change accordingly. + * keylist.c (list_internal_keys): Ditto. + * server.c (option_handler): Add "with-ephemeral-keys". + 2009-03-12 Werner Koch <[email protected]> * certdump.c (gpgsm_dump_time): Remove. diff --git a/sm/gpgsm.c b/sm/gpgsm.c index fe9ebf302..f49b742c2 100644 --- a/sm/gpgsm.c +++ b/sm/gpgsm.c @@ -1259,7 +1259,7 @@ main ( int argc, char **argv) case oWithKeyData: opt.with_key_data=1; /* fall thru */ case oWithColons: ctrl.with_colons = 1; break; case oWithValidation: ctrl.with_validation=1; break; - case oWithEphemeralKeys: opt.with_ephemeral_keys=1; break; + case oWithEphemeralKeys: ctrl.with_ephemeral_keys=1; break; case oSkipVerify: opt.skip_verify=1; break; diff --git a/sm/gpgsm.h b/sm/gpgsm.h index 984dda135..0b16e51c2 100644 --- a/sm/gpgsm.h +++ b/sm/gpgsm.h @@ -82,9 +82,6 @@ struct int with_md5_fingerprint; /* Also print an MD5 fingerprint for standard key listings. */ - int with_ephemeral_keys; /* Include ephemeral flagged keys in the - keylisting. */ - int armor; /* force base64 armoring (see also ctrl.with_base64) */ int no_armor; /* don't try to figure out whether data is base64 armored*/ @@ -176,6 +173,8 @@ struct server_control_s int with_colons; /* Use column delimited output format */ int with_chain; /* Include the certifying certs in a listing */ int with_validation;/* Validate each key while listing. */ + int with_ephemeral_keys; /* Include ephemeral flagged keys in the + keylisting. */ int autodetect_encoding; /* Try to detect the input encoding */ int is_pem; /* Is in PEM format */ diff --git a/sm/keylist.c b/sm/keylist.c index 39b82c29d..8a9eaf5e7 100644 --- a/sm/keylist.c +++ b/sm/keylist.c @@ -1292,7 +1292,7 @@ list_internal_keys (ctrl_t ctrl, strlist_t names, estream_t fp, gpg_error_t rc = 0; const char *lastresname, *resname; int have_secret; - int want_ephemeral = opt.with_ephemeral_keys; + int want_ephemeral = ctrl->with_ephemeral_keys; hd = keydb_new (0); if (!hd) diff --git a/sm/server.c b/sm/server.c index 9b0a04f18..6b9eeb82d 100644 --- a/sm/server.c +++ b/sm/server.c @@ -296,6 +296,11 @@ option_handler (assuan_context_t ctx, const char *key, const char *value) } else if (!strcmp (key, "allow-pinentry-notify")) ctrl->server_local->allow_pinentry_notify = 1; + else if (!strcmp (key, "with-ephemeral-keys")) + { + int i = *value? atoi (value) : 0; + ctrl->with_ephemeral_keys = i; + } else return gpg_error (GPG_ERR_UNKNOWN_OPTION); |