[Openvpn-devel] [PATCH] convert *_inline attributes to bool

2016-12-18 Thread Antonio Quartulli
Carrying around the INLINE_TAG is not really efficient, because it requires a strcmp() to be performed every time we want to understand if the data is stored inline or not. Convert all the *_inline attributes to bool to make the logic easier and checks more efficient. Signed-off-by: Antonio Quart

[Openvpn-devel] [PATCH] cleanup: merge packet_id_alloc_outgoing() into packet_id_write()

2016-12-18 Thread Steffan Karger
The functions packet_id_alloc_outgoing() and packet_id_write() were always called in tandem. Instead of forcing the caller to allocate a packet_id_net to do so, merge the two functions. This simplifies the API and reduces the chance on mistakes in the future. This patch adds unit tests to verify

Re: [Openvpn-devel] [PATCH] Use SHA256 for the internal digest, instead of MD5

2016-12-18 Thread Gert Doering
Hi, On Sun, Dec 18, 2016 at 05:40:55PM +0100, Steffan Karger wrote: > Our internal options digest uses MD5 hashes to store the state, instead of > storing the full options string. There's nothing wrong with that, but it > would still be better to use SHA256 because: > * That makes it easier to m

Re: [Openvpn-devel] [PATCH v2] reformatting: fix style in crypto*.{c, h}

2016-12-18 Thread Selva Nair
On Sun, Dec 18, 2016 at 1:26 PM, Steffan Karger wrote: > Now that we have touched each and every file anyway, I decided to go over > the code I regularly work with and reformat it some more by hand. This is > how for I got today, and is a large enough patch I think. > > This commit is mostly jus

[Openvpn-devel] [PATCH v2] reformatting: fix style in crypto*.{c, h}

2016-12-18 Thread Steffan Karger
Now that we have touched each and every file anyway, I decided to go over the code I regularly work with and reformat it some more by hand. This is how for I got today, and is a large enough patch I think. This commit is mostly just reordering and changing whitespace, with one exception: it remov

Re: [Openvpn-devel] [PATCH] reformatting: fix style in crypto*.{c, h}

2016-12-18 Thread Steffan Karger
Hi, On 18-12-16 18:45, Selva Nair wrote: > Not a comprehensive review, but a couple of teeny things I noticed .. Thanks. > On Sun, Dec 18, 2016 at 11:33 AM, Steffan Karger > wrote: > > in crypto.c > > @@ -1389,13 +1396,15 @@ read_key_file(struct key2 *key2, const

Re: [Openvpn-devel] [PATCH] reformatting: fix style in crypto*.{c, h}

2016-12-18 Thread Selva Nair
Hi, Not a comprehensive review, but a couple of teeny things I noticed .. On Sun, Dec 18, 2016 at 11:33 AM, Steffan Karger wrote: in crypto.c @@ -1389,13 +1396,15 @@ read_key_file(struct key2 *key2, const char *file, > const unsigned int flags) > { > if (!key2->n) > { >

Re: [Openvpn-devel] [PATCHv2 1/2] Get NTLMv1 and NTLMv2 up and running

2016-12-18 Thread Steffan Karger
Hi, On 10-11-15 20:48, Gert Doering wrote: > On Fri, Oct 30, 2015 at 03:07:47PM +0100, Holger Kummert wrote: >> Am 30.10.2015 um 14:58 schrieb Steffan Karger: > [..] >>> Seems I forgot the * before the second msg_bufpos, sorry. msg_bufpos >>> itself is a pointer indeed, but *msg_bufpos is (used a

[Openvpn-devel] [PATCH] Use SHA256 for the internal digest, instead of MD5

2016-12-18 Thread Steffan Karger
Our internal options digest uses MD5 hashes to store the state, instead of storing the full options string. There's nothing wrong with that, but it would still be better to use SHA256 because: * That makes it easier to make OpenVPN "FIPS-compliant" (forbids MD5) * We don't have to explain anymor

[Openvpn-devel] [PATCH] Bump master to version 2.5_git

2016-12-18 Thread Steffan Karger
Now that we have the release/2.4 branch, the master branch version should be bumped to 2.5. Signed-off-by: Steffan Karger --- version.m4 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/version.m4 b/version.m4 index a8496f4..b1f446a 100644 --- a/version.m4 +++ b/version.

[Openvpn-devel] [PATCH] reformatting: fix style in crypto*.{c,h}

2016-12-18 Thread Steffan Karger
Now that we have touched each and every file anyway, I decided to go over the code I regularly work with and reformat it some more by hand. This is how for I got today, and is a large enough patch I think. This commit is mostly just reordering and changing whitespace, with one exception: it remov