diff options
-rw-r--r-- | src/lib/libcrypto/bn/bn_lib.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/libcrypto/bn/bn_lib.c b/src/lib/libcrypto/bn/bn_lib.c index 49cc6662db..980c9b5457 100644 --- a/src/lib/libcrypto/bn/bn_lib.c +++ b/src/lib/libcrypto/bn/bn_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bn_lib.c,v 1.78 2023/03/27 10:25:02 tb Exp $ */ | 1 | /* $OpenBSD: bn_lib.c,v 1.79 2023/03/31 19:39:15 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -379,6 +379,9 @@ BN_copy(BIGNUM *a, const BIGNUM *b) | |||
379 | memcpy(a->d, b->d, sizeof(b->d[0]) * b->top); | 379 | memcpy(a->d, b->d, sizeof(b->d[0]) * b->top); |
380 | #endif | 380 | #endif |
381 | 381 | ||
382 | /* Copy constant time flag from b, but make it sticky on a. */ | ||
383 | a->flags |= b->flags & BN_FLG_CONSTTIME; | ||
384 | |||
382 | a->top = b->top; | 385 | a->top = b->top; |
383 | a->neg = b->neg; | 386 | a->neg = b->neg; |
384 | return (a); | 387 | return (a); |