diff options
author | Werner Koch <wk@gnupg.org> | 2024-03-27 12:12:52 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2024-03-27 12:12:52 +0100 |
commit | 571a768ac62c8be8597748d27faf54167476c2e5 (patch) | |
tree | 637236297fa603cb40eb82142e142e60cf581c9d /sm | |
parent | scd:openpgp: Fix data_objects specification for F9 and FA. (diff) | |
download | gnupg2-571a768ac62c8be8597748d27faf54167476c2e5.tar.xz gnupg2-571a768ac62c8be8597748d27faf54167476c2e5.zip |
gpgsm: Allow to add extensions at the --gen-key prompt.
* sm/certreqgen-ui.c (gpgsm_gencertreq_tty): Add a prompt for
extensions.
--
An example for an extension would be extKeyUsage for authentication:
2.5.29.37 n 301406082B0601050507030206082B06010505070301
Diffstat (limited to 'sm')
-rw-r--r-- | sm/certreqgen-ui.c | 5 | ||||
-rw-r--r-- | sm/certreqgen.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sm/certreqgen-ui.c b/sm/certreqgen-ui.c index 6ea481529..267c4f4b5 100644 --- a/sm/certreqgen-ui.c +++ b/sm/certreqgen-ui.c @@ -388,6 +388,11 @@ gpgsm_gencertreq_tty (ctrl_t ctrl, estream_t output_stream) tty_printf (_(" (optional; end with an empty line):\n")); ask_mb_lines (&mb_uri, "Name-URI: "); + /* Extensions */ + tty_printf (_("Enter extensions")); + tty_printf (_(" (optional; end with an empty line):\n")); + ask_mb_lines (&mb_uri, "Extension: "); + /* Want a self-signed certificate? */ selfsigned = tty_get_answer_is_yes diff --git a/sm/certreqgen.c b/sm/certreqgen.c index 75343385d..435333298 100644 --- a/sm/certreqgen.c +++ b/sm/certreqgen.c @@ -49,6 +49,11 @@ Signing-Key: 68A638998DFABAC510EA645CE34F9686B2EDF7EA %commit + Commnn extensions: + ExtKeyUsage: clientAuth (suggested) serverAuth (suggested) + -> 2.5.29.37 n 301406082B0601050507030206082B06010505070301 + + */ |