]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fix polarssl / mbedtls builds
authorSteffan Karger <steffan@karger.me>
Fri, 13 May 2016 06:54:52 +0000 (08:54 +0200)
committerGert Doering <gert@greenie.muc.de>
Fri, 13 May 2016 07:00:11 +0000 (09:00 +0200)
Commit 8a399cd3 hardened the OpenSSL default cipher list,
but also introduced a change in shared code that causes
polarssl / mbedtls builds to break when no --tls-cipher is
specified.

This fix is backported code from the master branch.

Signed-off-by: Steffan Karger <steffan@karger.me>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1463122492-701-1-git-send-email-steffan@karger.me>
URL: http://article.gmane.org/gmane.network.openvpn.devel/11647
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/ssl_polarssl.c

index 1f5836959d09df02fb8fda4c76aa26d73f1dd757..92636981739a72bbfd8cd5e76b62fb46c2c9028d 100644 (file)
@@ -176,7 +176,12 @@ tls_ctx_restrict_ciphers(struct tls_root_ctx *ctx, const char *ciphers)
 {
   char *tmp_ciphers, *tmp_ciphers_orig, *token;
   int i, cipher_count;
-  int ciphers_len = strlen (ciphers);
+  int ciphers_len;
+
+  if (NULL == ciphers)
+    return; /* Nothing to do */
+
+  ciphers_len = strlen (ciphers);
 
   ASSERT (NULL != ctx);
   ASSERT (0 != ciphers_len);