aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/openssl/crypto/o_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/crypto/o_init.c')
-rw-r--r--crypto/openssl/crypto/o_init.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/crypto/openssl/crypto/o_init.c b/crypto/openssl/crypto/o_init.c
index d767a90a5f43..c89fda5890ad 100644
--- a/crypto/openssl/crypto/o_init.c
+++ b/crypto/openssl/crypto/o_init.c
@@ -93,4 +93,18 @@ void OPENSSL_init(void)
#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;
+ for (i = 0; i < len; i++)
+ x |= a[i] ^ b[i];
+
+ return x;
+ }
+#endif