Don't core dump when using CMAC with dgst.
[openssl.git] / apps / ecparam.c
index 465480bedd01bf9d0607577ce3156bfdd61ef890..de4e46f5a860f4cccb02bd5883107366236e885e 100644 (file)
  *                    in the asn1 der encoding
  *                    possible values: named_curve (default)
  *                                     explicit
- * -no_seed         - if 'explicit' parameters are choosen do not use the seed
+ * -no_seed         - if 'explicit' parameters are chosen do not use the seed
  * -genkey          - generate ec key
  * -rand file       - files to use for random number input
  * -engine e        - use engine e, possibly a hardware device
@@ -286,7 +286,7 @@ bad:
                BIO_printf(bio_err, "                                   "
                                " explicit\n");
                BIO_printf(bio_err, " -no_seed          if 'explicit'"
-                               " parameters are choosen do not"
+                               " parameters are chosen do not"
                                " use the seed\n");
                BIO_printf(bio_err, " -genkey           generate ec"
                                " key\n");
@@ -402,6 +402,9 @@ bad:
                        }
                else
                        nid = OBJ_sn2nid(curve_name);
+
+               if (nid == 0)
+                       nid = EC_curve_nist2nid(curve_name);
        
                if (nid == 0)
                        {