Re: [Openvpn-devel] [PATCH 0/28] Refactor OpenSSL crypto functions

2011-06-24 Thread Adriaan de Jong
As a quick bootnote: the numbering of these patches starts at 10, continuing from the previous doxygen patches... Adriaan > -Original Message- > From: Adriaan de Jong [mailto:dej...@fox-it.com] > Sent: vrijdag 24 juni 2011 11:55 > To: openvpn-devel@lists.sourceforge.net > Subject: [Openv

[Openvpn-devel] [PATCH 27/28] Whitespace fixes in ntlm.c

2011-06-24 Thread Adriaan de Jong
Signed-off-by: Adriaan de Jong --- ntlm.c | 388 ++-- 1 files changed, 204 insertions(+), 184 deletions(-) diff --git a/ntlm.c b/ntlm.c index 30d5d11..3bcf6e8 100644 --- a/ntlm.c +++ b/ntlm.c @@ -37,7 +37,6 @@ #include "memdbg.h" -

[Openvpn-devel] [PATCH 26/28] Removed stale OpenSSL defines from crypto.h

2011-06-24 Thread Adriaan de Jong
--- crypto.h | 119 -- crypto_openssl.c |2 + ssl.c|3 + 3 files changed, 5 insertions(+), 119 deletions(-) diff --git a/crypto.h b/crypto.h index dd99598..24ab9fa 100644 --- a/crypto.h +++ b/crypto.h @@ -34,22 +34,6

[Openvpn-devel] [PATCH 24/28] Added PRNG doxygen

2011-06-24 Thread Adriaan de Jong
--- crypto.h | 29 + 1 files changed, 29 insertions(+), 0 deletions(-) diff --git a/crypto.h b/crypto.h index 1f9eca9..2888021 100644 --- a/crypto.h +++ b/crypto.h @@ -407,10 +407,39 @@ void crypto_adjust_frame_parameters(struct frame *frame,

[Openvpn-devel] [PATCH 28/28] Added a check for Openssl or PolarSSL defines

2011-06-24 Thread Adriaan de Jong
--- options.h |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/options.h b/options.h index 8a51502..39ca68a 100644 --- a/options.h +++ b/options.h @@ -77,6 +77,9 @@ struct options_pre_pull }; #endif +#if !defined(USE_OPENSSL) && !defined(USE_POLARSSL) +# error "At leas

[Openvpn-devel] [PATCH 25/28] Refactored: Moved crypto.h inline functions to end of file

2011-06-24 Thread Adriaan de Jong
--- crypto.h | 21 +++-- 1 files changed, 11 insertions(+), 10 deletions(-) diff --git a/crypto.h b/crypto.h index 2888021..dd99598 100644 --- a/crypto.h +++ b/crypto.h @@ -480,16 +480,6 @@ void free_ssl_lib (void); #endif /* USE_SSL */ /* - * Inline functions - */ - -static

[Openvpn-devel] [PATCH 19/28] Refactored message digest type functions

2011-06-24 Thread Adriaan de Jong
--- crypto.c | 49 - crypto.h | 18 +- crypto_backend.h | 33 + crypto_openssl.c | 49 + options.c|2 +- 5 files chang

[Openvpn-devel] [PATCH 20/28] Refactored message digest functions

2011-06-24 Thread Adriaan de Jong
--- crypto.c | 47 + crypto.h |4 +- crypto_backend.h | 60 ++ crypto_openssl.c | 52 httpdigest.c | 77 -

[Openvpn-devel] [PATCH 23/28] Refactored cipher functions

2011-06-24 Thread Adriaan de Jong
--- crypto.c | 68 +--- crypto.h | 26 ++--- crypto_backend.h | 100 ++ crypto_openssl.c | 89 4 files changed, 218 insertions(+), 65

[Openvpn-devel] [PATCH 22/28] Refactored cipher key types

2011-06-24 Thread Adriaan de Jong
--- crypto.c | 48 +++- crypto.h |6 +-- crypto_backend.h | 63 +++ crypto_openssl.c | 108 ++ options.c|4 +- 5 files changed, 181 insertions(+), 48 deletions(-

[Openvpn-devel] [PATCH 21/28] Refactored HMAC functions

2011-06-24 Thread Adriaan de Jong
--- crypto.c | 57 ++ crypto_backend.h | 60 + crypto_openssl.c | 71 ++ ntlm.c | 15 ++- 4 files changed, 153 insertions(+), 50

[Openvpn-devel] [PATCH 16/28] Refactored crypto initialisation functions

2011-06-24 Thread Adriaan de Jong
--- crypto.c | 138 + crypto.h | 22 --- crypto_backend.h | 23 crypto_openssl.c | 164 ++ init.c |4 +- ssl.c|4 +- 6 files changed, 193

[Openvpn-devel] [PATCH 18/28] Refactored NTLM DES key generation

2011-06-24 Thread Adriaan de Jong
--- crypto_backend.h | 11 +++ crypto_openssl.c | 11 +++ ntlm.c | 12 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/crypto_backend.h b/crypto_backend.h index f0e7b18..6c2bd0c 100644 --- a/crypto_backend.h +++ b/crypto_backend.h @@ -12

[Openvpn-devel] [PATCH 15/28] Refactored SSL_clear_error()

2011-06-24 Thread Adriaan de Jong
--- crypto.c |6 +++--- crypto_backend.h |2 ++ crypto_openssl.c |6 ++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/crypto.c b/crypto.c index 409c298..bdb3b1d 100644 --- a/crypto.c +++ b/crypto.c @@ -191,8 +191,8 @@ openvpn_encrypt (struct buffer *buf, s

[Openvpn-devel] [PATCH 17/28] Refactored DES key manipulation functions

2011-06-24 Thread Adriaan de Jong
--- crypto.c | 85 ++-- crypto_backend.h | 37 +++ crypto_openssl.c | 87 ++ crypto_openssl.h | 15 + ntlm.c |2 +- 5 files changed, 144 ins

[Openvpn-devel] [PATCH 14/28] Refactored show_available_* functions

2011-06-24 Thread Adriaan de Jong
--- crypto.c | 85 -- crypto.h |6 --- crypto_backend.h |6 +++ crypto_openssl.c | 121 ++ 4 files changed, 127 insertions(+), 91 deletions(-) diff --git a/crypto.c b/crypto.c index

[Openvpn-devel] [PATCH 11/28] Refactored to rand_bytes for OpenSSL-independency

2011-06-24 Thread Adriaan de Jong
--- Makefile.am |7 +- crypto.c | 11 + crypto_backend.h | 61 ++ crypto_openssl.c | 53 ++ crypto_openssl.h | 37 init.c

[Openvpn-devel] [PATCH 12/28] Refactored OpenSSL-specific constants

2011-06-24 Thread Adriaan de Jong
--- crypto.c | 28 ++-- crypto.h |7 --- crypto_openssl.h | 18 ++ init.c |4 ++-- ssl.c|8 5 files changed, 42 insertions(+), 23 deletions(-) diff --git a/crypto.c b/crypto.c index 68b8564.

[Openvpn-devel] [PATCH 0/28] Refactor OpenSSL crypto functions

2011-06-24 Thread Adriaan de Jong
Hi everyone, This is the second series of patches for the master branch. This patch separates the OpenSSL crypto functions (those in crypto.c) into a separate OpenSSL backend. The API for this backend is defined in crypto_backend.h. Note that I also migrated all functions within OpenVPN that

[Openvpn-devel] [PATCH 10/28] Changed configure to accept --with-ssl-type=openssl

2011-06-24 Thread Adriaan de Jong
Signed-off-by: Adriaan de Jong --- configure.ac | 153 -- 1 files changed, 84 insertions(+), 69 deletions(-) diff --git a/configure.ac b/configure.ac index a3789d9..5e7c10d 100644 --- a/configure.ac +++ b/configure.ac @@ -75,13 +75,13 @@ A

[Openvpn-devel] [PATCH 13/28] Refactored maximum cipher and hmac length constants

2011-06-24 Thread Adriaan de Jong
--- crypto.c | 12 crypto.h | 24 crypto_backend.h | 34 ++ crypto_openssl.c | 12 4 files changed, 46 insertions(+), 36 deletions(-) diff --git a/crypto.c b/crypto.c index 8af5b7a..a1986e0