Commit 9acdddf1 authored by Nicola Tuveri's avatar Nicola Tuveri
Browse files

Clear BN_FLG_CONSTTIME on BN_CTX_get()



(cherry picked from commit c8147d37)

Reviewed-by: default avatarMatt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8295)
parent d769ce09
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -299,6 +299,8 @@ BIGNUM *BN_CTX_get(BN_CTX *ctx)
    }
    /* OK, make sure the returned bignum is "zero" */
    BN_zero(ret);
    /* clear BN_FLG_CONSTTIME if leaked from previous frames */
    ret->flags &= (~BN_FLG_CONSTTIME);
    ctx->used++;
    CTXDBG_RET(ctx, ret);
    return ret;