There is patch 'git show 41e4b67a229e774ebc57a882c386e10d80e10e7e'
which actually works arround poor support of c99 in MSVC compiler released
in 2013 :)
It introduces the bug because exported key size is always sizeof(unsigned
char *).
There is patch for this.
>From 65c273f4d2eb63a26d270b870e303d5eff99cd0a Mon Sep 17 00:00:00 2001
From: Daniel Kubec <n...@rtfm.cz>
List-Post: openvpn-devel@lists.sourceforge.net
Date: Wed, 27 Apr 2016 07:40:31 +0200
Subject: [PATCH 1/1] Exported keying material is always sizeof(unsigned char *)
There is patch 'git show 41e4b67a229e774ebc57a882c386e10d80e10e7e'
which actually works arround poor support of c99 in MSVC compiler released in 2013 :)
It introduces the bug because exported key size is always sizeof(unsigned char *).
There is patch for this.
---
src/openvpn/ssl_openssl.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c
index ca9b67b..8909ca3 100644
--- a/src/openvpn/ssl_openssl.c
+++ b/src/openvpn/ssl_openssl.c
@@ -144,7 +144,7 @@ key_state_export_keying_material(struct key_state_ssl *ssl,
struct gc_arena gc = gc_new();
unsigned char* ekm = (unsigned char*) gc_malloc(size, true, &gc);
- if (SSL_export_keying_material(ssl->ssl, ekm, sizeof(ekm),
+ if (SSL_export_keying_material(ssl->ssl, ekm, size,
session->opt->ekm_label, session->opt->ekm_label_size, NULL, 0, 0))
{
unsigned int len = (size * 2) + 2;
--
1.7.1