diff --git a/crypto/bn/bn_nist.c b/crypto/bn/bn_nist.c index 86bb0429f..99cfc3f35 100644 --- a/crypto/bn/bn_nist.c +++ b/crypto/bn/bn_nist.c @@ -1047,6 +1047,10 @@ int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *field, return 1; } +#ifdef _W32_WCE +#pragma optimize( "", off ) +#endif + #define BN_NIST_521_RSHIFT (521%BN_BITS2) #define BN_NIST_521_LSHIFT (BN_BITS2-BN_NIST_521_RSHIFT) #define BN_NIST_521_TOP_MASK ((BN_ULONG)BN_MASK2>>BN_NIST_521_LSHIFT) @@ -1113,6 +1117,10 @@ int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *field, return 1; } +#ifdef _W32_WCE +#pragma optimize( "", on ) +#endif + int (*BN_nist_mod_func(const BIGNUM *p))(BIGNUM *r, const BIGNUM *a, const BIGNUM *field, BN_CTX *ctx) { if (BN_ucmp(&_bignum_nist_p_192, p) == 0) diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c index 87768d94e..118fca1ee 100644 --- a/crypto/cryptlib.c +++ b/crypto/cryptlib.c @@ -382,7 +382,9 @@ void OpenSSLDie(const char *file,int line,const char *assertion) abort(); #else /* Win32 abort() customarily shows a dialog, but we just did that... */ +#ifdef SIGABRT raise(SIGABRT); +#endif _exit(3); #endif } diff --git a/fips/dh/fips_dhvs.c b/fips/dh/fips_dhvs.c index 0fb52f79a..a925e13c7 100644 --- a/fips/dh/fips_dhvs.c +++ b/fips/dh/fips_dhvs.c @@ -286,7 +286,7 @@ int main(int argc, char **argv) return 0; parse_error: fprintf(stderr, "Error Parsing request file\n"); - exit(1); + return 1; } #endif diff --git a/fips/rand/fips_rand.c b/fips/rand/fips_rand.c index f80c00575..5fa052746 100644 --- a/fips/rand/fips_rand.c +++ b/fips/rand/fips_rand.c @@ -232,6 +232,9 @@ void FIPS_get_timevec(unsigned char *buf, unsigned long *pctr) { #ifdef OPENSSL_SYS_WIN32 FILETIME ft; +#ifdef _WIN32_WCE + SYSTEMTIME t; +#endif #elif defined(OPENSSL_SYS_VXWORKS) struct timespec ts; #else @@ -243,7 +246,12 @@ void FIPS_get_timevec(unsigned char *buf, unsigned long *pctr) #endif #ifdef OPENSSL_SYS_WIN32 +#ifdef _WIN32_WCE + GetSystemTime(&t); + SystemTimeToFileTime(&t, &ft); +#else GetSystemTimeAsFileTime(&ft); +#endif buf[0] = (unsigned char) (ft.dwHighDateTime & 0xff); buf[1] = (unsigned char) ((ft.dwHighDateTime >> 8) & 0xff); buf[2] = (unsigned char) ((ft.dwHighDateTime >> 16) & 0xff); diff --git a/util/pl/VC-32.pl b/util/pl/VC-32.pl index e98eb1e1b..24b8172ff 100644 --- a/util/pl/VC-32.pl +++ b/util/pl/VC-32.pl @@ -123,7 +123,7 @@ elsif ($FLAVOR =~ /CE/) } $cc='$(CC)'; - $base_cflags=' /W3 /WX /GF /Gy /nologo -DUNICODE -D_UNICODE -DOPENSSL_SYSNAME_WINCE -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DNO_CHMOD -DOPENSSL_SMALL_FOOTPRINT'; + $base_cflags=' /W3 /GF /Gy /nologo -DUNICODE -D_UNICODE -DOPENSSL_SYSNAME_WINCE -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DNO_CHMOD -DOPENSSL_SMALL_FOOTPRINT'; $base_cflags.=" $wcecdefs"; $base_cflags.=' -I$(WCECOMPAT)/include' if (defined($ENV{'WCECOMPAT'})); $base_cflags.=' -I$(PORTSDK_LIBPATH)/../../include' if (defined($ENV{'PORTSDK_LIBPATH'}));