diff options
author | Samuel Weiser <samuel.weiser@iaik.tugraz.at> | 2017-09-16 16:52:44 +0200 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2017-09-27 10:12:19 +0100 |
commit | 8372efbd2fd093f4ea9178f95b918b08fd50771e (patch) | |
tree | e64d3227fd1d380144c12e6d089b90b813125ea2 /crypto/bn/bn_lib.c | |
parent | a703f4473f1ce8f0080e420800eefb1fba9258ed (diff) |
BN_copy now propagates BN_FLG_CONSTTIME
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4377)
(cherry picked from commit 9f9442918aeaed5dc2442d81ab8d29fe3e1fb906)
Diffstat (limited to 'crypto/bn/bn_lib.c')
-rw-r--r-- | crypto/bn/bn_lib.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c index 10b78f5126..f9c65f9f94 100644 --- a/crypto/bn/bn_lib.c +++ b/crypto/bn/bn_lib.c @@ -524,6 +524,9 @@ BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b) memcpy(a->d, b->d, sizeof(b->d[0]) * b->top); #endif + if (BN_get_flags(b, BN_FLG_CONSTTIME) != 0) + BN_set_flags(a, BN_FLG_CONSTTIME); + a->top = b->top; a->neg = b->neg; bn_check_top(a); |