Commit 5eee95a5 authored by Nicola Tuveri's avatar Nicola Tuveri
Browse files

Backport #6648 to OpenSSL_1_1_0-stable

parent 837017b4
Loading
Loading
Loading
Loading
+24 −22
Original line number Diff line number Diff line
@@ -382,6 +382,7 @@ int ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
        return EC_POINT_set_to_infinity(group, r);
    }

    if (!BN_is_zero(group->order) && !BN_is_zero(group->cofactor)) {
        /*-
         * Handle the common cases where the scalar is secret, enforcing a constant
         * time scalar multiplication algorithm.
@@ -407,6 +408,7 @@ int ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
             */
            return ec_mul_consttime(group, r, scalars[0], points[0], ctx);
        }
    }

    for (i = 0; i < num; i++) {
        if (!ec_point_is_compat(points[i], group)) {