diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2011-01-19 14:35:53 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2011-01-19 14:35:53 +0000 |
commit | 198ce9a611b451656e7c984e16452e285597a015 (patch) | |
tree | 1d2f911b3340ae1e7ed76c367c0daf7d52e7d199 /crypto/ec/ecp_smpl.c | |
parent | 78c45722960510f63f9ee151959ea2f63fac7ba3 (diff) | |
download | openssl-198ce9a611b451656e7c984e16452e285597a015.tar.gz |
Add additional parameter to dsa_builtin_paramgen to output the generated
seed to: this doesn't introduce any binary compatibility issues as the
function is only used internally.
The seed output is needed for FIPS 140-2 algorithm testing: the functionality
used to be in DSA_generate_parameters_ex() but was removed in OpenSSL 1.0.0
Diffstat (limited to 'crypto/ec/ecp_smpl.c')
-rw-r--r-- | crypto/ec/ecp_smpl.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/crypto/ec/ecp_smpl.c b/crypto/ec/ecp_smpl.c index 4d26f8bdf6..3e56b71a21 100644 --- a/crypto/ec/ecp_smpl.c +++ b/crypto/ec/ecp_smpl.c @@ -441,8 +441,11 @@ int ec_GFp_simple_set_Jprojective_coordinates_GFp(const EC_GROUP *group, EC_POIN } point->Z_is_one = Z_is_one; } - - ret = 1; + + if (BN_cmp(&point->X, x) || BN_cmp(&point->Y, y)) + ret = 2; + else + ret = 1; err: if (new_ctx != NULL) @@ -1406,6 +1409,9 @@ int ec_GFp_simple_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT * { return EC_POINT_is_at_infinity(group, b) ? 0 : 1; } + + if (EC_POINT_is_at_infinity(group, b)) + return 1; if (a->Z_is_one && b->Z_is_one) { @@ -1494,7 +1500,6 @@ int ec_GFp_simple_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT * return ret; } - int ec_GFp_simple_make_affine(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx) { BN_CTX *new_ctx = NULL; |