summaryrefslogtreecommitdiff
path: root/src/p11tool.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2014-07-07 16:58:53 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2014-07-07 16:58:53 +0200
commit20a277a0ceb331511cc58bfe3f7dc4147c2745a1 (patch)
tree5675fcf7b2174b0e1ed7905d1ad9b0f609a13986 /src/p11tool.c
parenta0a0607393aeb2c3a30b00f7359ed15dac8f236b (diff)
downloadgnutls-20a277a0ceb331511cc58bfe3f7dc4147c2745a1.tar.gz
p11tool/certtool: Added --curve parameter.
The curve parameter allows to explicitly specify the curve to use when generating a key.
Diffstat (limited to 'src/p11tool.c')
-rw-r--r--src/p11tool.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/p11tool.c b/src/p11tool.c
index 809383a902..e2d30edfc1 100644
--- a/src/p11tool.c
+++ b/src/p11tool.c
@@ -180,6 +180,10 @@ static void cmd_parser(int argc, char **argv)
bits = OPT_VALUE_BITS;
}
+ if (HAVE_OPT(CURVE)) {
+ bits = GNUTLS_CURVE_TO_BITS(str_to_curve(OPT_ARG(CURVE)));
+ }
+
if (HAVE_OPT(SEC_PARAM)) {
sec_param = OPT_ARG(SEC_PARAM);
}