diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-03-11 06:19:08 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-03-11 06:19:08 +0000 |
commit | 9b4203266e7e0e7d162bde0063281d0ab6e0b415 (patch) | |
tree | f8e81d34b49dca09d622fcb1efee4914d8c6d26e /src/common | |
parent | 59e2c77824840f8cd5706c4ae660bc7f50bab0f1 (diff) | |
download | tor-9b4203266e7e0e7d162bde0063281d0ab6e0b415.tar tor-9b4203266e7e0e7d162bde0063281d0ab6e0b415.tar.gz |
Make OP work on windows! (Also misc logging tweaks)
svn:r1258
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/crypto.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c index 7452f6056..d5a5a9c1e 100644 --- a/src/common/crypto.c +++ b/src/common/crypto.c @@ -2,6 +2,8 @@ /* See LICENSE for licensing information */ /* $Id$ */ +#include "../or/or.h" + #include <string.h> #include <openssl/err.h> @@ -19,10 +21,13 @@ #include <limits.h> #include "crypto.h" -#include "../or/or.h" #include "log.h" #include "aes.h" +#ifdef MS_WINDOWS +#include <wincrypt.h> +#endif + #if OPENSSL_VERSION_NUMBER < 0x00905000l #error "We require openssl >= 0.9.5" #elif OPENSSL_VERSION_NUMBER < 0x00906000l @@ -41,13 +46,6 @@ #define RETURN_SSL_OUTCOME(exp) return !(exp) #endif -#ifdef MS_WINDOWS -#define WIN32_WINNT 0x400 -#define _WIN32_WINNT 0x400 -#include <windows.h> -#include <wincrypt.h> -#endif - struct crypto_pk_env_t { int type; @@ -1043,7 +1041,7 @@ void crypto_dh_free(crypto_dh_env_t *dh) int crypto_seed_rng() { static int provider_set = 0; - static HCRYPTPROV p; + static HCRYPTPROV provider; char buf[21]; if (!provider_set) { |