diff options
author | miod <> | 2014-04-13 15:25:35 +0000 |
---|---|---|
committer | miod <> | 2014-04-13 15:25:35 +0000 |
commit | 1fb5cf10c3e597dbb1ecc4dd423bba727fd7721a (patch) | |
tree | 74f4ff344980894c7c9ceeab9b81176ac7572566 /src/lib/libcrypto/cryptlib.c | |
parent | 92349eb53934e1b3e9b807e603d45417a6320d21 (diff) | |
download | openbsd-1fb5cf10c3e597dbb1ecc4dd423bba727fd7721a.tar.gz openbsd-1fb5cf10c3e597dbb1ecc4dd423bba727fd7721a.tar.bz2 openbsd-1fb5cf10c3e597dbb1ecc4dd423bba727fd7721a.zip |
Merge conflicts; remove MacOS, Netware, OS/2, VMS and Windows build machinery.
Diffstat (limited to 'src/lib/libcrypto/cryptlib.c')
-rw-r--r-- | src/lib/libcrypto/cryptlib.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/lib/libcrypto/cryptlib.c b/src/lib/libcrypto/cryptlib.c index 766ea8cac7..0b77d8b7d0 100644 --- a/src/lib/libcrypto/cryptlib.c +++ b/src/lib/libcrypto/cryptlib.c | |||
@@ -504,7 +504,7 @@ void CRYPTO_THREADID_current(CRYPTO_THREADID *id) | |||
504 | CRYPTO_THREADID_set_numeric(id, (unsigned long)find_thread(NULL)); | 504 | CRYPTO_THREADID_set_numeric(id, (unsigned long)find_thread(NULL)); |
505 | #else | 505 | #else |
506 | /* For everything else, default to using the address of 'errno' */ | 506 | /* For everything else, default to using the address of 'errno' */ |
507 | CRYPTO_THREADID_set_pointer(id, &errno); | 507 | CRYPTO_THREADID_set_pointer(id, (void*)&errno); |
508 | #endif | 508 | #endif |
509 | } | 509 | } |
510 | 510 | ||
@@ -704,6 +704,7 @@ void OPENSSL_cpuid_setup(void) | |||
704 | } | 704 | } |
705 | else | 705 | else |
706 | vec = OPENSSL_ia32_cpuid(); | 706 | vec = OPENSSL_ia32_cpuid(); |
707 | |||
707 | /* | 708 | /* |
708 | * |(1<<10) sets a reserved bit to signal that variable | 709 | * |(1<<10) sets a reserved bit to signal that variable |
709 | * was initialized already... This is to avoid interference | 710 | * was initialized already... This is to avoid interference |
@@ -888,7 +889,7 @@ void OPENSSL_showfatal (const char *fmta,...) | |||
888 | 889 | ||
889 | #if defined(_WIN32_WINNT) && _WIN32_WINNT>=0x0333 | 890 | #if defined(_WIN32_WINNT) && _WIN32_WINNT>=0x0333 |
890 | /* this -------------v--- guards NT-specific calls */ | 891 | /* this -------------v--- guards NT-specific calls */ |
891 | if (GetVersion() < 0x80000000 && OPENSSL_isservice() > 0) | 892 | if (check_winnt() && OPENSSL_isservice() > 0) |
892 | { HANDLE h = RegisterEventSource(0,_T("OPENSSL")); | 893 | { HANDLE h = RegisterEventSource(0,_T("OPENSSL")); |
893 | const TCHAR *pmsg=buf; | 894 | const TCHAR *pmsg=buf; |
894 | ReportEvent(h,EVENTLOG_ERROR_TYPE,0,0,0,1,0,&pmsg,0); | 895 | ReportEvent(h,EVENTLOG_ERROR_TYPE,0,0,0,1,0,&pmsg,0); |
@@ -924,3 +925,16 @@ void OpenSSLDie(const char *file,int line,const char *assertion) | |||
924 | } | 925 | } |
925 | 926 | ||
926 | void *OPENSSL_stderr(void) { return stderr; } | 927 | void *OPENSSL_stderr(void) { return stderr; } |
928 | |||
929 | int CRYPTO_memcmp(const void *in_a, const void *in_b, size_t len) | ||
930 | { | ||
931 | size_t i; | ||
932 | const unsigned char *a = in_a; | ||
933 | const unsigned char *b = in_b; | ||
934 | unsigned char x = 0; | ||
935 | |||
936 | for (i = 0; i < len; i++) | ||
937 | x |= a[i] ^ b[i]; | ||
938 | |||
939 | return x; | ||
940 | } | ||