diff options
author | 2015-06-20 14:19:39 +0000 | |
---|---|---|
committer | 2015-06-20 14:19:39 +0000 | |
commit | c3d447c201850453f683fdcf2b0ab3b6652fc15a (patch) | |
tree | 10baf815ca8b7275f4d380696df51f256110d1ed /lib/libssl/src | |
parent | Have ECPKParameters_print() include the NIST curve name, if known. (diff) | |
download | wireguard-openbsd-c3d447c201850453f683fdcf2b0ab3b6652fc15a.tar.xz wireguard-openbsd-c3d447c201850453f683fdcf2b0ab3b6652fc15a.zip |
Handle NIST curve names.
From OpenSSL.
ok miod@ (a while ago)
Diffstat (limited to 'lib/libssl/src')
-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) { |