Changes between 0.9.8 and 0.9.8a [XX xxx XXXX]
+ *) Extended Windows CE support.
+ [Satoshi Nakamura and Andy Polyakov]
+
*) Initialize SSL_METHOD structures at compile time instead of during
runtime, thus removing the need for a lock.
[Steve Henson]
extern "C" {
#endif
+#ifdef _
+#undef _
+#endif
+
typedef unsigned char _ossl_old_des_cblock[8];
typedef struct _ossl_old_des_ks_struct
{
#include <openssl/rand.h>
#include <openssl/bn.h>
+#if defined(_MSC_VER) && defined(_MIPS_) && _MSC_VER<1300
+/* suppress "too big too optimize" warning */
+#pragma warning(disable:4959)
+#endif
+
#define ABORT do { \
fflush(stdout); \
fprintf(stderr, "%s:%d: ABORT\n", __FILE__, __LINE__); \
#define CURSOR_SHOWING 0x00000001
#endif /* CURSOR_SHOWING */
+#if !defined(OPENSSL_SYS_WINCE)
typedef BOOL (WINAPI *CRYPTACQUIRECONTEXTW)(HCRYPTPROV *, LPCWSTR, LPCWSTR,
DWORD, DWORD);
typedef BOOL (WINAPI *CRYPTGENRANDOM)(HCRYPTPROV, DWORD, BYTE *);
typedef BOOL (WINAPI *MODULE32)(HANDLE, LPMODULEENTRY32);
#include <lmcons.h>
-#ifndef OPENSSL_SYS_WINCE
#include <lmstats.h>
-#endif
#if 1 /* The NET API is Unicode only. It requires the use of the UNICODE
* macro. When UNICODE is defined LPTSTR becomes LPWSTR. LMSTR was
* was added to the Platform SDK to allow the NET API to be used in
(LPWSTR, LPWSTR, DWORD, DWORD, LPBYTE*);
typedef NET_API_STATUS (NET_API_FUNCTION * NETFREE)(LPBYTE);
#endif /* 1 */
+#endif /* !OPENSSL_SYS_WINCE */
int RAND_poll(void)
{
MEMORYSTATUS m;
HCRYPTPROV hProvider = 0;
- BYTE buf[64];
DWORD w;
int good = 0;
# if defined(_WIN32_WCE) && _WIN32_WCE>=300
/* Even though MSDN says _WIN32_WCE>=210, it doesn't seem to be available
* in commonly available implementations prior 300... */
-# ifndef CryptAcquireContext
- /* reserve for broken header... */
-# define CryptAcquireContext CryptAcquireContextW
-# endif
+ {
+ BYTE buf[64];
/* poll the CryptoAPI PRNG */
/* The CryptoAPI returns sizeof(buf) bytes of randomness */
- if (CryptAcquireContext(&hProvider, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT))
+ if (CryptAcquireContextW(&hProvider, NULL, NULL, PROV_RSA_FULL,
+ CRYPT_VERIFYCONTEXT))
{
if (CryptGenRandom(hProvider, sizeof(buf), buf))
RAND_add(buf, sizeof(buf), sizeof(buf));
CryptReleaseContext(hProvider, 0);
}
+ }
# endif
#else /* OPENSSL_SYS_WINCE */
/*
CRYPTRELEASECONTEXT release = NULL;
NETSTATGET netstatget = NULL;
NETFREE netfree = NULL;
+ BYTE buf[64];
if (netapi)
{
0xfe,0x7f,0xc1,0xad,
};
+#if defined(_MSC_VER) && defined(_ARM_)
+#pragma optimize("g",off)
+#endif
+
/* It has come to my attention that there are 2 versions of the RC2
* key schedule. One which is normal, and anther which has a hook to
* use a reduced key length.
*(ki--)=((k[i]<<8)|k[i-1])&0xffff;
}
+#if defined(_MSC_VER)
+#pragma optimize("",on)
+#endif
const static unsigned char zeroes[] = {0,0,0,0,0,0,0,0};
+#if defined(_MSC_VER) && defined(_ARM_)
+#pragma optimize("g", off)
+#endif
+
int RSA_verify_PKCS1_PSS(RSA *rsa, const unsigned char *mHash,
const EVP_MD *Hash, const unsigned char *EM, int sLen)
{
return ret;
}
+
+#if defined(_MSC_VER)
+#pragma optimize("",on)
+#endif
#include <openssl/ui.h>
#include <openssl/crypto.h>
+#ifdef _
+#undef _
+#endif
+
struct ui_method_st
{
char *name;
/^X86/ && do { $wcecdefs.=" -Dx86 -D_X86_";
$wcelflag.=" /machine:X86"; last; };
/^ARM/ && do { $wcecdefs.=" -DARM -D_ARM_";
- $wcelflag.=" /machine:$wcetgt"; last; };
+ $wcelflag.=" /machine:ARM"; last; };
/^R4[0-9]{3}/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DMIPS_R4000";
$wcelflag.=" /machine:MIPS"; last; };
/^SH[0-9]/ && do { $wcecdefs.=" -D$wcetgt -D_$wcetgt_ -DSHx";
$base_cflags.=" $wcecdefs";
$base_cflags.=" -Qsh4" if ($wcetgt =~ /^SH4/);
$opt_cflags=' /MC /O1i'; # optimize for space, but with intrinsics...
- $opt_cflags.=' /wd4959'; # disable "too large to optimize" warning...
$dbg_clfags=' /MC /Od -DDEBUG -D_DEBUG';
$lflags="/nologo /opt:ref $wcelflag";
}