From: Cynh Date: Sun, 1 May 2016 13:59:43 +0000 (+0200) Subject: Fix SRP client key computation X-Git-Tag: OpenSSL_1_1_0-pre6~775 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c9141a43e246d527ec8b5a97b98e93fc31b0f0b8;p=oweals%2Fopenssl.git Fix SRP client key computation Signed-off-by: Kurt Roeckx Reviewed-by: Matt Caswell GH: #1017 --- diff --git a/crypto/srp/srp_lib.c b/crypto/srp/srp_lib.c index ff06175747..780f5ab518 100644 --- a/crypto/srp/srp_lib.c +++ b/crypto/srp/srp_lib.c @@ -228,9 +228,9 @@ BIGNUM *SRP_Calc_client_key(BIGNUM *N, BIGNUM *B, BIGNUM *g, BIGNUM *x, goto err; if (!BN_mod_sub(tmp, B, tmp2, N, bn_ctx)) goto err; - if (!BN_mod_mul(tmp3, u, x, N, bn_ctx)) + if (!BN_mul(tmp3, u, x, bn_ctx)) goto err; - if (!BN_mod_add(tmp2, a, tmp3, N, bn_ctx)) + if (!BN_add(tmp2, a, tmp3)) goto err; if (!BN_mod_exp(K, tmp, tmp2, N, bn_ctx)) goto err;