Commit b1d7eaac authored by Cynh's avatar Cynh Committed by Kurt Roeckx
Browse files

Fix SRP client key computation



Signed-off-by: default avatarKurt Roeckx <kurt@roeckx.be>
Reviewed-by: default avatarMatt Caswell <matt@openssl.org>

GH: #1017
(cherry picked from commit c9141a43)
parent 72fdf002
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -279,9 +279,9 @@ BIGNUM *SRP_Calc_client_key(BIGNUM *N, BIGNUM *B, BIGNUM *g, BIGNUM *x,
    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;