summaryrefslogtreecommitdiffstats
path: root/crypto/o_init.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-01-22 02:47:42 +0000
committerMatt Caswell <matt@openssl.org>2015-01-22 09:52:55 +0000
commit40720ce3caf44294b5b87a18856b7aef06123314 (patch)
tree30d57dec407c05fe6ea57275517805e8c79a7dcc /crypto/o_init.c
parent9d03aabea3ead1fe6a194297ddffd4a87f89b93c (diff)
Run util/openssl-format-source -v -c .
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto/o_init.c')
-rw-r--r--crypto/o_init.c69
1 files changed, 35 insertions, 34 deletions
diff --git a/crypto/o_init.c b/crypto/o_init.c
index c89fda5890..6f5103e26d 100644
--- a/crypto/o_init.c
+++ b/crypto/o_init.c
@@ -1,5 +1,6 @@
/* o_init.c */
-/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
+/*
+ * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project.
*/
/* ====================================================================
@@ -10,7 +11,7 @@
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
@@ -61,50 +62,50 @@
/* Internal only functions: only ever used here */
#ifdef OPENSSL_FIPS
-extern void int_ERR_lib_init(void);
+extern void int_ERR_lib_init(void);
# ifndef OPENSSL_NO_ENGINE
-extern void int_EVP_MD_init_engine_callbacks(void );
-extern void int_EVP_CIPHER_init_engine_callbacks(void );
-extern void int_RAND_init_engine_callbacks(void );
+extern void int_EVP_MD_init_engine_callbacks(void);
+extern void int_EVP_CIPHER_init_engine_callbacks(void);
+extern void int_RAND_init_engine_callbacks(void);
# endif
#endif
-/* Perform any essential OpenSSL initialization operations.
- * Currently only sets FIPS callbacks
+/*
+ * Perform any essential OpenSSL initialization operations. Currently only
+ * sets FIPS callbacks
*/
void OPENSSL_init(void)
- {
+{
#ifdef OPENSSL_FIPS
- static int done = 0;
- if (!done)
- {
- int_ERR_lib_init();
-#ifdef CRYPTO_MDEBUG
- CRYPTO_malloc_debug_init();
-#endif
-#ifndef OPENSSL_NO_ENGINE
- int_EVP_MD_init_engine_callbacks();
- int_EVP_CIPHER_init_engine_callbacks();
- int_RAND_init_engine_callbacks();
-#endif
- done = 1;
- }
+ static int done = 0;
+ if (!done) {
+ int_ERR_lib_init();
+# ifdef CRYPTO_MDEBUG
+ CRYPTO_malloc_debug_init();
+# endif
+# ifndef OPENSSL_NO_ENGINE
+ int_EVP_MD_init_engine_callbacks();
+ int_EVP_CIPHER_init_engine_callbacks();
+ int_RAND_init_engine_callbacks();
+# endif
+ done = 1;
+ }
#endif
- }
-
+}
+
#ifdef OPENSSL_FIPS
int CRYPTO_memcmp(const void *in_a, const void *in_b, size_t len)
- {
- size_t i;
- const unsigned char *a = in_a;
- const unsigned char *b = in_b;
- unsigned char x = 0;
+{
+ size_t i;
+ const unsigned char *a = in_a;
+ const unsigned char *b = in_b;
+ unsigned char x = 0;
- for (i = 0; i < len; i++)
- x |= a[i] ^ b[i];
+ for (i = 0; i < len; i++)
+ x |= a[i] ^ b[i];
- return x;
- }
+ return x;
+}
#endif