summaryrefslogtreecommitdiffstats
path: root/crypto/cryptlib.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2011-05-26 14:19:19 +0000
committerDr. Stephen Henson <steve@openssl.org>2011-05-26 14:19:19 +0000
commit7207eca1ee06ad4b5b5ab7b16e57f5f4f61606dd (patch)
tree807dd0dc17677e2ba0a464548ac94096a4ca6933 /crypto/cryptlib.c
parent9c34782478f00faba7bac87bd03a0f4f1ee53747 (diff)
The first of many changes to make OpenSSL 1.0.1 FIPS capable.
Add static build support to openssl utility. Add new "fips" option to Configure. Make use of installed fipsld and fips_standalone_sha1 Initialise FIPS error callbacks, locking and DRBG. Doesn't do anything much yet: no crypto is redirected to the FIPS module. Doesn't completely build either but the openssl utility can enter FIPS mode: which doesn't do anything much either.
Diffstat (limited to 'crypto/cryptlib.c')
-rw-r--r--crypto/cryptlib.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c
index 14bae0d08c..a453475fdb 100644
--- a/crypto/cryptlib.c
+++ b/crypto/cryptlib.c
@@ -409,6 +409,10 @@ int (*CRYPTO_get_add_lock_callback(void))(int *num,int mount,int type,
void CRYPTO_set_locking_callback(void (*func)(int mode,int type,
const char *file,int line))
{
+ /* Calling this here ensures initialisation before any threads
+ * are started.
+ */
+ OPENSSL_init();
locking_callback=func;
}