From: jsing Date: Sat, 20 Jun 2015 14:24:49 +0000 (+0000) Subject: Handle NIST curve names in openssl(1) ecparam. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b4c4114d16e88206f27c84cab74246e723688da4;p=openbsd Handle NIST curve names in openssl(1) ecparam. From OpenSSL. --- 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);