diff options
author | Andy Polyakov <appro@openssl.org> | 2005-08-02 13:58:39 +0200 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2005-08-02 13:58:39 +0200 |
commit | 8a35fb3beaf3caf3ee2ce6e78bac96950d7d4d67 (patch) | |
tree | 587b76b7a7078d3f50de9b06bf5c986c65dfa7b6 /crypto/rand/rand_win.c | |
parent | Type in OSF1 platform name. (diff) | |
download | openssl-8a35fb3beaf3caf3ee2ce6e78bac96950d7d4d67.tar.xz openssl-8a35fb3beaf3caf3ee2ce6e78bac96950d7d4d67.zip |
Eliminate bogus #if WCEPLATFORM!=MS_HPC_PRO [which by the way unconditionally
invalidated the whole clause] and replace it with #if _WIN32_WCE>=210.
Diffstat (limited to 'crypto/rand/rand_win.c')
-rw-r--r-- | crypto/rand/rand_win.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/crypto/rand/rand_win.c b/crypto/rand/rand_win.c index 47bf758282..e609cc1aa1 100644 --- a/crypto/rand/rand_win.c +++ b/crypto/rand/rand_win.c @@ -217,21 +217,22 @@ int RAND_poll(void) osverinfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO) ; GetVersionEx( &osverinfo ) ; -#if defined(OPENSSL_SYS_WINCE) && WCEPLATFORM!=MS_HPC_PRO -#ifndef CryptAcquireContext -#define CryptAcquireContext CryptAcquireContextW -#endif +#if defined(OPENSSL_SYS_WINCE) +# if defined(_WIN32_WCE) && _WIN32_WCE>=210 +# ifndef CryptAcquireContext + /* reserve for broken header... */ +# define CryptAcquireContext CryptAcquireContextW +# endif /* poll the CryptoAPI PRNG */ /* The CryptoAPI returns sizeof(buf) bytes of randomness */ - if (CryptAcquireContext(&hProvider, 0, 0, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) + if (CryptAcquireContext(&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 - -#ifndef OPENSSL_SYS_WINCE +# endif +#else /* OPENSSL_SYS_WINCE */ /* * None of below libraries are present on Windows CE, which is * why we #ifndef the whole section. This also excuses us from @@ -361,7 +362,7 @@ int RAND_poll(void) { /* poll the CryptoAPI PRNG */ /* The CryptoAPI returns sizeof(buf) bytes of randomness */ - if (acquire(&hProvider, 0, 0, PROV_RSA_FULL, + if (acquire(&hProvider, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) { if (gen(hProvider, sizeof(buf), buf) != 0) |