[or-cvs] Make OP work on windows! (Also misc logging tweaks)

Nick Mathewson nickm at seul.org
Thu Mar 11 06:19:10 UTC 2004


Update of /home/or/cvsroot/src/common
In directory moria.mit.edu:/tmp/cvs-serv3675/src/common

Modified Files:
	crypto.c 
Log Message:
Make OP work on windows! (Also misc logging tweaks)

Index: crypto.c
===================================================================
RCS file: /home/or/cvsroot/src/common/crypto.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- crypto.c	11 Mar 2004 05:14:06 -0000	1.53
+++ crypto.c	11 Mar 2004 06:19:08 -0000	1.54
@@ -1,6 +1,8 @@
 /* Copyright 2001,2002,2003 Roger Dingledine, Matej Pfajfar. */
 /* See LICENSE for licensing information */
 /* $Id$ */
+
+#include "../or/or.h"
 
 #include <string.h>
 
@@ -19,9 +21,12 @@
 #include <limits.h>
 
 #include "crypto.h"
-#include "../or/or.h"
 #include "log.h"
-#include "aes.h"
+#include "aes.h"
+
+#ifdef MS_WINDOWS
+#include <wincrypt.h>
+#endif
 
 #if OPENSSL_VERSION_NUMBER < 0x00905000l
 #error "We require openssl >= 0.9.5"
@@ -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 @@
 int crypto_seed_rng()
 {
   static int provider_set = 0;
-  static HCRYPTPROV p;
+  static HCRYPTPROV provider;
   char buf[21];
 
   if (!provider_set) {



More information about the tor-commits mailing list