diff options
author | djm <> | 2012-10-13 21:23:50 +0000 |
---|---|---|
committer | djm <> | 2012-10-13 21:23:50 +0000 |
commit | 228cae30b117c2493f69ad3c195341cd6ec8d430 (patch) | |
tree | 29ff00b10d52c0978077c4fd83c33b065bade73e /src/lib/libcrypto/ecdsa/ecs_ossl.c | |
parent | 731838c66b52c0ae5888333005b74115a620aa96 (diff) | |
download | openbsd-228cae30b117c2493f69ad3c195341cd6ec8d430.tar.gz openbsd-228cae30b117c2493f69ad3c195341cd6ec8d430.tar.bz2 openbsd-228cae30b117c2493f69ad3c195341cd6ec8d430.zip |
import OpenSSL-1.0.1c
Diffstat (limited to 'src/lib/libcrypto/ecdsa/ecs_ossl.c')
-rw-r--r-- | src/lib/libcrypto/ecdsa/ecs_ossl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/libcrypto/ecdsa/ecs_ossl.c b/src/lib/libcrypto/ecdsa/ecs_ossl.c index 1bbf328de5..7725935610 100644 --- a/src/lib/libcrypto/ecdsa/ecs_ossl.c +++ b/src/lib/libcrypto/ecdsa/ecs_ossl.c | |||
@@ -167,6 +167,7 @@ static int ecdsa_sign_setup(EC_KEY *eckey, BN_CTX *ctx_in, BIGNUM **kinvp, | |||
167 | goto err; | 167 | goto err; |
168 | } | 168 | } |
169 | } | 169 | } |
170 | #ifndef OPENSSL_NO_EC2M | ||
170 | else /* NID_X9_62_characteristic_two_field */ | 171 | else /* NID_X9_62_characteristic_two_field */ |
171 | { | 172 | { |
172 | if (!EC_POINT_get_affine_coordinates_GF2m(group, | 173 | if (!EC_POINT_get_affine_coordinates_GF2m(group, |
@@ -176,6 +177,7 @@ static int ecdsa_sign_setup(EC_KEY *eckey, BN_CTX *ctx_in, BIGNUM **kinvp, | |||
176 | goto err; | 177 | goto err; |
177 | } | 178 | } |
178 | } | 179 | } |
180 | #endif | ||
179 | if (!BN_nnmod(r, X, order, ctx)) | 181 | if (!BN_nnmod(r, X, order, ctx)) |
180 | { | 182 | { |
181 | ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_BN_LIB); | 183 | ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_BN_LIB); |
@@ -454,6 +456,7 @@ static int ecdsa_do_verify(const unsigned char *dgst, int dgst_len, | |||
454 | goto err; | 456 | goto err; |
455 | } | 457 | } |
456 | } | 458 | } |
459 | #ifndef OPENSSL_NO_EC2M | ||
457 | else /* NID_X9_62_characteristic_two_field */ | 460 | else /* NID_X9_62_characteristic_two_field */ |
458 | { | 461 | { |
459 | if (!EC_POINT_get_affine_coordinates_GF2m(group, | 462 | if (!EC_POINT_get_affine_coordinates_GF2m(group, |
@@ -463,7 +466,7 @@ static int ecdsa_do_verify(const unsigned char *dgst, int dgst_len, | |||
463 | goto err; | 466 | goto err; |
464 | } | 467 | } |
465 | } | 468 | } |
466 | 469 | #endif | |
467 | if (!BN_nnmod(u1, X, order, ctx)) | 470 | if (!BN_nnmod(u1, X, order, ctx)) |
468 | { | 471 | { |
469 | ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB); | 472 | ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB); |