Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Langley <agl@chromium.org>2014-08-13 21:31:52 +0400
committerAdam Langley <agl@chromium.org>2014-08-14 20:42:45 +0400
commitb8b5478248deae0d0f97ec38792fea5120bbfc49 (patch)
treea4519869a0fe1c3945aa8819535a28639a11c148 /include/openssl/bn.h
parent660140206ed32aa217ba3f299debae8d9ac472ec (diff)
Expose two, rather internal, BIGNUM functions.
Android uses these for some conversions from Java formats. The code is sufficiently bespoke that putting the conversion functions into BoringSSL doesn't make a lot of sense, but the alternative is to expose these ones. Change-Id: If1362bc4a5c44cba4023c909e2ba6488ae019ddb
Diffstat (limited to 'include/openssl/bn.h')
-rw-r--r--include/openssl/bn.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/openssl/bn.h b/include/openssl/bn.h
index d9863941..d8aa2151 100644
--- a/include/openssl/bn.h
+++ b/include/openssl/bn.h
@@ -284,6 +284,22 @@ OPENSSL_EXPORT int BN_print_fp(FILE *fp, const BIGNUM *a);
OPENSSL_EXPORT BN_ULONG BN_get_word(const BIGNUM *bn);
+/* Internal functions.
+ *
+ * These functions are useful for code that is doing low-level manipulations of
+ * BIGNUM values. However, be sure that no other function in this file does
+ * what you want before turning to these. */
+
+/* bn_correct_top decrements |bn->top| until |bn->d[top-1]| is non-zero or
+ * until |top| is zero. */
+OPENSSL_EXPORT void bn_correct_top(BIGNUM *bn);
+
+/* bn_wexpand ensures that |bn| has at least |words| works of space without
+ * altering its value. It returns one on success or zero on allocation
+ * failure. */
+OPENSSL_EXPORT BIGNUM *bn_wexpand(BIGNUM *bn, unsigned words);
+
+
/* BIGNUM pools.
*
* Certain BIGNUM operations need to use many temporary variables and