summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ec/ecp_nist.c
diff options
context:
space:
mode:
authorbeck <>2017-01-29 17:49:23 +0000
committerbeck <>2017-01-29 17:49:23 +0000
commit957b11334a7afb14537322f0e4795b2e368b3f59 (patch)
tree1a54abba678898ee5270ae4f3404a50ee9a92eea /src/lib/libcrypto/ec/ecp_nist.c
parentdf96e020e729c6c37a8c7fe311fdd1fe6a8718c5 (diff)
downloadopenbsd-957b11334a7afb14537322f0e4795b2e368b3f59.tar.gz
openbsd-957b11334a7afb14537322f0e4795b2e368b3f59.tar.bz2
openbsd-957b11334a7afb14537322f0e4795b2e368b3f59.zip
Send the function codes from the error functions to the bit bucket,
as was done earlier in libssl. Thanks inoguchi@ for noticing libssl had more reacharounds into this. ok jsing@ inoguchi@
Diffstat (limited to 'src/lib/libcrypto/ec/ecp_nist.c')
-rw-r--r--src/lib/libcrypto/ec/ecp_nist.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/ec/ecp_nist.c b/src/lib/libcrypto/ec/ecp_nist.c
index a33f9d9e39..24cba64d2e 100644
--- a/src/lib/libcrypto/ec/ecp_nist.c
+++ b/src/lib/libcrypto/ec/ecp_nist.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecp_nist.c,v 1.9 2014/07/12 16:03:37 miod Exp $ */ 1/* $OpenBSD: ecp_nist.c,v 1.10 2017/01/29 17:49:23 beck Exp $ */
2/* 2/*
3 * Written by Nils Larsch for the OpenSSL project. 3 * Written by Nils Larsch for the OpenSSL project.
4 */ 4 */
@@ -145,7 +145,7 @@ ec_GFp_nist_group_set_curve(EC_GROUP *group, const BIGNUM *p,
145 else if (BN_ucmp(BN_get0_nist_prime_521(), p) == 0) 145 else if (BN_ucmp(BN_get0_nist_prime_521(), p) == 0)
146 group->field_mod_func = BN_nist_mod_521; 146 group->field_mod_func = BN_nist_mod_521;
147 else { 147 else {
148 ECerr(EC_F_EC_GFP_NIST_GROUP_SET_CURVE, EC_R_NOT_A_NIST_PRIME); 148 ECerror(EC_R_NOT_A_NIST_PRIME);
149 goto err; 149 goto err;
150 } 150 }
151 151
@@ -166,7 +166,7 @@ ec_GFp_nist_field_mul(const EC_GROUP *group, BIGNUM *r, const BIGNUM *a,
166 BN_CTX *ctx_new = NULL; 166 BN_CTX *ctx_new = NULL;
167 167
168 if (!group || !r || !a || !b) { 168 if (!group || !r || !a || !b) {
169 ECerr(EC_F_EC_GFP_NIST_FIELD_MUL, ERR_R_PASSED_NULL_PARAMETER); 169 ECerror(ERR_R_PASSED_NULL_PARAMETER);
170 goto err; 170 goto err;
171 } 171 }
172 if (!ctx) 172 if (!ctx)
@@ -193,7 +193,7 @@ ec_GFp_nist_field_sqr(const EC_GROUP * group, BIGNUM * r, const BIGNUM * a,
193 BN_CTX *ctx_new = NULL; 193 BN_CTX *ctx_new = NULL;
194 194
195 if (!group || !r || !a) { 195 if (!group || !r || !a) {
196 ECerr(EC_F_EC_GFP_NIST_FIELD_SQR, EC_R_PASSED_NULL_PARAMETER); 196 ECerror(EC_R_PASSED_NULL_PARAMETER);
197 goto err; 197 goto err;
198 } 198 }
199 if (!ctx) 199 if (!ctx)