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:
authorDavid Benjamin <davidben@google.com>2016-03-26 07:58:38 +0300
committerDavid Benjamin <davidben@google.com>2016-03-31 22:35:53 +0300
commit9e5eb63d011cbc6730b4fbc05c4dd3ae6021e97f (patch)
treeb476e621c0b871b4c4943cf8ff2ce7f291939b4b /include/openssl/crypto.h
parentd879e299366895d7d80d83cfbbe05bc6a09e2a27 (diff)
Document that CRYPTO_library_init may be called concurrently.
This was fixed in 93a5b442964d9770b5faa0fb381a8c4f43e65abe, but it wasn't documented. Now that there are no pre-init functions to call like CRYPTO_set_neon_capable, one instance of BoringSSL may be safely shared between multiple consumers. As part of that, multiple consumers need to be able to call CRYPTO_library_init possibly redundantlyand possibly on different threads without synchronization. (Though there is still that static initializer nuisance. It would be nice to replace this with internal CRYPTO_once_t's and then CRYPTO_library_init need only be called to prime armcap for a sandbox. But one thing at a time.) Change-Id: I48430182d3649c8cf19082e34da24dee48e6119e Reviewed-on: https://boringssl-review.googlesource.com/7571 Reviewed-by: Emily Stark (Dunn) <estark@google.com> Reviewed-by: David Benjamin <davidben@google.com>
Diffstat (limited to 'include/openssl/crypto.h')
-rw-r--r--include/openssl/crypto.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/openssl/crypto.h b/include/openssl/crypto.h
index 51e10286..b52bcf80 100644
--- a/include/openssl/crypto.h
+++ b/include/openssl/crypto.h
@@ -36,7 +36,8 @@ extern "C" {
/* CRYPTO_library_init initializes the crypto library. It must be called if the
* library is built with BORINGSSL_NO_STATIC_INITIALIZER. Otherwise, it does
- * nothing and a static initializer is used instead.
+ * nothing and a static initializer is used instead. It is safe to call this
+ * function multiple times and concurrently from multiple threads.
*
* On some ARM configurations, this function may require filesystem access and
* should be called before entering a sandbox. */