From b4c4114d16e88206f27c84cab74246e723688da4 Mon Sep 17 00:00:00 2001 From: jsing Date: Sat, 20 Jun 2015 14:24:49 +0000 Subject: [PATCH] Handle NIST curve names in openssl(1) ecparam. From OpenSSL. --- usr.bin/openssl/ecparam.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usr.bin/openssl/ecparam.c b/usr.bin/openssl/ecparam.c index c958c1f51b2..5922c1803ad 100644 --- a/usr.bin/openssl/ecparam.c +++ b/usr.bin/openssl/ecparam.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ecparam.c,v 1.8 2014/12/28 15:48:52 jsing Exp $ */ +/* $OpenBSD: ecparam.c,v 1.9 2015/06/20 14:24:49 jsing Exp $ */ /* * Written by Nils Larsch for the OpenSSL project. */ @@ -361,6 +361,9 @@ ecparam_main(int argc, char **argv) } else nid = OBJ_sn2nid(ecparam_config.curve_name); + if (nid == 0) + nid = EC_curve_nist2nid(ecparam_config.curve_name); + if (nid == 0) { BIO_printf(bio_err, "unknown curve name (%s)\n", ecparam_config.curve_name); -- 2.20.1