aboutsummaryrefslogtreecommitdiffstats
path: root/scd/command.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2020-02-11 13:49:11 +0000
committerWerner Koch <[email protected]>2020-02-11 13:49:11 +0000
commitd7d75da50543bc7259c5a6e6367b58cbca7f1b7b (patch)
tree3ca62ba6efe6d31b2d8de2d144fc5a4bc71973a7 /scd/command.c
parentcommon: Extend the openpgp_curve_to_oid function. (diff)
downloadgnupg-d7d75da50543bc7259c5a6e6367b58cbca7f1b7b.tar.gz
gnupg-d7d75da50543bc7259c5a6e6367b58cbca7f1b7b.zip
scd:openpgp: Allow auto-changing of the key attributes in genkey.
* scd/app-openpgp.c (struct app_local_s): Add field keyalgo. (parse_algorithm_attribute): Store the new keyalgo field. (change_keyattr): Change info message. (change_keyattr_from_string): Rewrite to also accept a keyref and a keyalgo string. (do_genkey): Change the keyattr if a keyalgo string is given. -- Having this feature makes it easier to use OpenPGP cards in a similar way to other cards. Note that the explicit changing via SETATTR is still supported. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'scd/command.c')
-rw-r--r--scd/command.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/scd/command.c b/scd/command.c
index 60904429c..527fb9385 100644
--- a/scd/command.c
+++ b/scd/command.c
@@ -1363,7 +1363,7 @@ cmd_writekey (assuan_context_t ctx, char *line)
static const char hlp_genkey[] =
- "GENKEY [--force] [--timestamp=<isodate>] <keyref>\n"
+ "GENKEY [--force] [--timestamp=<isodate>] [--algo=ALGO] <keyref>\n"
"\n"
"Generate a key on-card identified by <keyref>, which is application\n"
"specific. Return values are also application specific. For OpenPGP\n"
@@ -1385,6 +1385,9 @@ static const char hlp_genkey[] =
"value. The value needs to be in ISO Format; e.g.\n"
"\"--timestamp=20030316T120000\" and after 1970-01-01 00:00:00.\n"
"\n"
+ "The option --algo can be used to request creation using a specific\n"
+ "algorithm. The possible algorithms are card dependent.\n"
+ "\n"
"The public part of the key can also later be retrieved using the\n"
"READKEY command.";
static gpg_error_t
@@ -1562,7 +1565,7 @@ static const char hlp_checkpin[] =
" entry system, only the regular CHV will get blocked and not the\n"
" dangerous CHV3. IDSTR is the usual card's serial number in hex\n"
" notation; an optional fingerprint part will get ignored. There\n"
- " is however a special mode if the IDSTR is sffixed with the\n"
+ " is however a special mode if the IDSTR is suffixed with the\n"
" literal string \"[CHV3]\": In this case the Admin PIN is checked\n"
" if and only if the retry counter is still at 3.\n"
"\n"