projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
BN_copy now propagates BN_FLG_CONSTTIME
[openssl.git]
/
crypto
/
bn
/
bn_lib.c
diff --git
a/crypto/bn/bn_lib.c
b/crypto/bn/bn_lib.c
index 10b78f5126076f614545d16e618aede4679553c1..f9c65f9f948a91193e9c5d1246ddea4e4958477e 100644
(file)
--- 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);