summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2016-08-08 15:25:16 -0400
committerRich Salz <rsalz@openssl.org>2016-08-10 10:07:37 -0400
commitf67cbb74437842a0f88f84f43a0faa968ca77b35 (patch)
tree9dba773faa20f100582f94ff7eeebe73d7646bed /include
parent5898b8eb87e464b80153cae3424f4d283cb841b6 (diff)
Add #defines for magic numbers in API.
Binary- and backward-compatible. Just better. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1429)
Diffstat (limited to 'include')
-rw-r--r--include/openssl/bn.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/openssl/bn.h b/include/openssl/bn.h
index 4dc2abd838..17bd52136c 100644
--- a/include/openssl/bn.h
+++ b/include/openssl/bn.h
@@ -82,6 +82,15 @@ extern "C" {
void BN_set_flags(BIGNUM *b, int n);
int BN_get_flags(const BIGNUM *b, int n);
+/* Values for |top| in BN_rand() */
+#define BN_RAND_TOP_ANY -1
+#define BN_RAND_TOP_ONE 0
+#define BN_RAND_TOP_TWO 1
+
+/* Values for |bottom| in BN_rand() */
+#define BN_RAND_BOTTOM_ANY 0
+#define BN_RAND_BOTTOM_ODD 1
+
/*
* get a clone of a BIGNUM with changed flags, for *temporary* use only (the
* two BIGNUMs cannot be used in parallel!). Also only for *read only* use. The