diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2015-06-20 14:19:40 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2015-06-20 14:19:40 +0000 |
commit | dce672a5f72afaa4bb13f08aeed7f1d13d12b546 (patch) | |
tree | f9be74ce687f72049af276efe4dd24dd76092377 | |
parent | 4dc321f3850bc5af7821b246ac8f5fa25331f85a (diff) |
Handle NIST curve names.
From OpenSSL.
ok miod@ (a while ago)
-rw-r--r-- | lib/libssl/src/crypto/ec/ec_pmeth.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libssl/src/crypto/ec/ec_pmeth.c b/lib/libssl/src/crypto/ec/ec_pmeth.c index 07933dc5fde..a52bff1f2fc 100644 --- a/lib/libssl/src/crypto/ec/ec_pmeth.c +++ b/lib/libssl/src/crypto/ec/ec_pmeth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ec_pmeth.c,v 1.8 2014/07/12 16:03:37 miod Exp $ */ +/* $OpenBSD: ec_pmeth.c,v 1.9 2015/06/20 14:19:39 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2006. */ @@ -248,7 +248,9 @@ pkey_ec_ctrl_str(EVP_PKEY_CTX * ctx, { if (!strcmp(type, "ec_paramgen_curve")) { int nid; - nid = OBJ_sn2nid(value); + nid = EC_curve_nist2nid(value); + if (nid == NID_undef) + nid = OBJ_sn2nid(value); if (nid == NID_undef) nid = OBJ_ln2nid(value); if (nid == NID_undef) { |