From 1af89ce540d4cac253169423325bad73fa57f7fd Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 17 Jan 2013 14:38:15 -0500 Subject: [PATCH 1/4] Fix an MSVC warning in onion.h prototypes --- src/or/onion.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/or/onion.h b/src/or/onion.h index 8b5fb7e3bb..db4c999c9e 100644 --- a/src/or/onion.h +++ b/src/or/onion.h @@ -101,9 +101,9 @@ typedef struct extended_cell_t { int create_cell_parse(create_cell_t *cell_out, const cell_t *cell_in); int created_cell_parse(created_cell_t *cell_out, const cell_t *cell_in); -int extend_cell_parse(extend_cell_t *cell_out, uint8_t command, +int extend_cell_parse(extend_cell_t *cell_out, const uint8_t command, const uint8_t *payload_in, size_t payload_len); -int extended_cell_parse(extended_cell_t *cell_out, uint8_t command, +int extended_cell_parse(extended_cell_t *cell_out, const uint8_t command, const uint8_t *payload_in, size_t payload_len); int create_cell_format(cell_t *cell_out, const create_cell_t *cell_in); From 60a2aa8b00a9f4711ce5ee3da9240422bf561123 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 17 Jan 2013 14:38:52 -0500 Subject: [PATCH 2/4] Add ntor-related modules to the Makefiles.nmake --- src/common/Makefile.nmake | 6 +++++- src/or/Makefile.nmake | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/common/Makefile.nmake b/src/common/Makefile.nmake index 9672f4fe9d..0ebeaaaf71 100644 --- a/src/common/Makefile.nmake +++ b/src/common/Makefile.nmake @@ -6,10 +6,14 @@ LIBOR_OBJECTS = address.obj compat.obj container.obj di_ops.obj \ log.obj memarea.obj mempool.obj procmon.obj util.obj \ util_codedigest.obj -LIBOR_CRYPTO_OBJECTS = aes.obj crypto.obj torgzip.obj tortls.obj +LIBOR_CRYPTO_OBJECTS = aes.obj crypto.obj torgzip.obj tortls.obj \ + crypto_curve25519.obj curve25519-donna.obj LIBOR_EVENT_OBJECTS = compat_libevent.obj +curve25519-donna.obj: ..\ext\curve25519_donna\curve25519-donna.c + $(CC) $(CFLAGS) /D inline=_inline /c ..\ext\curve25519_donna\curve25519-donna.c + libor.lib: $(LIBOR_OBJECTS) lib $(LIBOR_OBJECTS) /out:libor.lib diff --git a/src/or/Makefile.nmake b/src/or/Makefile.nmake index c33407373c..d67123a9a6 100644 --- a/src/or/Makefile.nmake +++ b/src/or/Makefile.nmake @@ -44,6 +44,9 @@ LIBTOR_OBJECTS = \ nodelist.obj \ ntmain.obj \ onion.obj \ + onion_fast.obj \ + onion_ntor.obj \ + onion_tap.obj \ policies.obj \ reasons.obj \ relay.obj \ From 213bd7760fd1ef7f55f08a2d189aa7b3b29fa1d1 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 17 Jan 2013 14:44:26 -0500 Subject: [PATCH 3/4] For now, always use donna32 on msvc --- src/win32/orconfig.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/win32/orconfig.h b/src/win32/orconfig.h index 485590f11d..6e45a2928b 100644 --- a/src/win32/orconfig.h +++ b/src/win32/orconfig.h @@ -250,3 +250,6 @@ #define SHARE_DATADIR "" #define HAVE_EVENT2_DNS_H #define HAVE_EVENT_BASE_LOOPEXIT +#define CURVE25519_ENABLED +#define USE_CURVE25519_DONNA + From cd80f6ee0f8b479e0ad1815bef232d981649c367 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 17 Jan 2013 15:54:21 -0500 Subject: [PATCH 4/4] Another msvc changes entry --- changes/msvc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/changes/msvc b/changes/msvc index 9975c2d4c6..1ae92e3f2e 100644 --- a/changes/msvc +++ b/changes/msvc @@ -2,3 +2,5 @@ - Correctly define HAVE_EVENT_BASE_LOOPEXIT, since we only build with MSVC when using Libevent 2.0 or later. Fixes bug 7308. Reported by "ultramage". + - Make the ntor and curve25519 code build correctly with MSVC. + Fix on 0.2.4.8-alpha.