summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libcrypto/bn/bn.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/libcrypto/bn/bn.h b/src/lib/libcrypto/bn/bn.h
index f03b2c7be7..8fc5e270fc 100644
--- a/src/lib/libcrypto/bn/bn.h
+++ b/src/lib/libcrypto/bn/bn.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn.h,v 1.40 2021/09/08 12:19:17 tb Exp $ */ 1/* $OpenBSD: bn.h,v 1.41 2021/09/10 09:08:03 tb Exp $ */
2/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -231,6 +231,17 @@ extern "C" {
231#define BN_set_flags(b,n) ((b)->flags|=(n)) 231#define BN_set_flags(b,n) ((b)->flags|=(n))
232#define BN_get_flags(b,n) ((b)->flags&(n)) 232#define BN_get_flags(b,n) ((b)->flags&(n))
233 233
234#if defined(LIBRESSL_INTERNAL)
235/* Values for |top| in BN_rand() */
236#define BN_RAND_TOP_ANY -1
237#define BN_RAND_TOP_ONE 0
238#define BN_RAND_TOP_TWO 1
239
240/* Values for |bottom| in BN_rand() */
241#define BN_RAND_BOTTOM_ANY 0
242#define BN_RAND_BOTTOM_ODD 1
243#endif
244
234/* get a clone of a BIGNUM with changed flags, for *temporary* use only 245/* get a clone of a BIGNUM with changed flags, for *temporary* use only
235 * (the two BIGNUMs cannot not be used in parallel!) */ 246 * (the two BIGNUMs cannot not be used in parallel!) */
236#define BN_with_flags(dest,b,n) ((dest)->d=(b)->d, \ 247#define BN_with_flags(dest,b,n) ((dest)->d=(b)->d, \