summaryrefslogtreecommitdiff
path: root/thirdparty/openssl/crypto/bn/bn_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/openssl/crypto/bn/bn_lib.c')
-rw-r--r--thirdparty/openssl/crypto/bn/bn_lib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/thirdparty/openssl/crypto/bn/bn_lib.c b/thirdparty/openssl/crypto/bn/bn_lib.c
index 10b78f5126..f9c65f9f94 100644
--- a/thirdparty/openssl/crypto/bn/bn_lib.c
+++ b/thirdparty/openssl/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);