Handle NIST curve names in openssl(1) ecparam.
authorjsing <jsing@openbsd.org>
Sat, 20 Jun 2015 14:24:49 +0000 (14:24 +0000)
committerjsing <jsing@openbsd.org>
Sat, 20 Jun 2015 14:24:49 +0000 (14:24 +0000)
From OpenSSL.

usr.bin/openssl/ecparam.c

index c958c1f..5922c18 100644 (file)
@@ -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);