aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/cryptlib.c
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2013-03-07 21:47:13 +0000
committerXin LI <delphij@FreeBSD.org>2013-03-07 21:47:13 +0000
commit1e086defa5742bfee714119793aa1a068b17702d (patch)
tree4624b92ec50ab6d3105b1a4444850fe8be912236 /crypto/cryptlib.c
parent2b8b5455829304396e38200c205612c4dc57c052 (diff)
downloadsrc-vendor/openssl/0.9.8y.tar.gz
src-vendor/openssl/0.9.8y.zip
Import OpenSSL 0.9.8y.vendor/openssl/0.9.8y
Diffstat (limited to 'crypto/cryptlib.c')
-rw-r--r--crypto/cryptlib.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c
index dd74ea8855f4..dec3286f66d9 100644
--- a/crypto/cryptlib.c
+++ b/crypto/cryptlib.c
@@ -542,3 +542,19 @@ void OpenSSLDie(const char *file,int line,const char *assertion)
}
void *OPENSSL_stderr(void) { return stderr; }
+
+#ifndef 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