diff options
| author | jsing <> | 2015-06-20 14:19:39 +0000 |
|---|---|---|
| committer | jsing <> | 2015-06-20 14:19:39 +0000 |
| commit | 7952de62f93f53addb3723fb2fc924567c1a800d (patch) | |
| tree | f3f5da23e1738b131b2e0023091884eb0486ad12 /src | |
| parent | ded448f71012b0548efd5420fe57e9ee3906bc0e (diff) | |
| download | openbsd-7952de62f93f53addb3723fb2fc924567c1a800d.tar.gz openbsd-7952de62f93f53addb3723fb2fc924567c1a800d.tar.bz2 openbsd-7952de62f93f53addb3723fb2fc924567c1a800d.zip | |
Handle NIST curve names.
From OpenSSL.
ok miod@ (a while ago)
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/ec/ec_pmeth.c | 6 | ||||
| -rw-r--r-- | src/lib/libssl/src/crypto/ec/ec_pmeth.c | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/lib/libcrypto/ec/ec_pmeth.c b/src/lib/libcrypto/ec/ec_pmeth.c index 07933dc5fd..a52bff1f2f 100644 --- a/src/lib/libcrypto/ec/ec_pmeth.c +++ b/src/lib/libcrypto/ec/ec_pmeth.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ec_pmeth.c,v 1.8 2014/07/12 16:03:37 miod Exp $ */ | 1 | /* $OpenBSD: ec_pmeth.c,v 1.9 2015/06/20 14:19:39 jsing Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 2006. | 3 | * project 2006. |
| 4 | */ | 4 | */ |
| @@ -248,7 +248,9 @@ pkey_ec_ctrl_str(EVP_PKEY_CTX * ctx, | |||
| 248 | { | 248 | { |
| 249 | if (!strcmp(type, "ec_paramgen_curve")) { | 249 | if (!strcmp(type, "ec_paramgen_curve")) { |
| 250 | int nid; | 250 | int nid; |
| 251 | nid = OBJ_sn2nid(value); | 251 | nid = EC_curve_nist2nid(value); |
| 252 | if (nid == NID_undef) | ||
| 253 | nid = OBJ_sn2nid(value); | ||
| 252 | if (nid == NID_undef) | 254 | if (nid == NID_undef) |
| 253 | nid = OBJ_ln2nid(value); | 255 | nid = OBJ_ln2nid(value); |
| 254 | if (nid == NID_undef) { | 256 | if (nid == NID_undef) { |
diff --git a/src/lib/libssl/src/crypto/ec/ec_pmeth.c b/src/lib/libssl/src/crypto/ec/ec_pmeth.c index 07933dc5fd..a52bff1f2f 100644 --- a/src/lib/libssl/src/crypto/ec/ec_pmeth.c +++ b/src/lib/libssl/src/crypto/ec/ec_pmeth.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ec_pmeth.c,v 1.8 2014/07/12 16:03:37 miod Exp $ */ | 1 | /* $OpenBSD: ec_pmeth.c,v 1.9 2015/06/20 14:19:39 jsing Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 2006. | 3 | * project 2006. |
| 4 | */ | 4 | */ |
| @@ -248,7 +248,9 @@ pkey_ec_ctrl_str(EVP_PKEY_CTX * ctx, | |||
| 248 | { | 248 | { |
| 249 | if (!strcmp(type, "ec_paramgen_curve")) { | 249 | if (!strcmp(type, "ec_paramgen_curve")) { |
| 250 | int nid; | 250 | int nid; |
| 251 | nid = OBJ_sn2nid(value); | 251 | nid = EC_curve_nist2nid(value); |
| 252 | if (nid == NID_undef) | ||
| 253 | nid = OBJ_sn2nid(value); | ||
| 252 | if (nid == NID_undef) | 254 | if (nid == NID_undef) |
| 253 | nid = OBJ_ln2nid(value); | 255 | nid = OBJ_ln2nid(value); |
| 254 | if (nid == NID_undef) { | 256 | if (nid == NID_undef) { |
