comparison patches/0003-Add-possibility-to-force-polarssl-ciphersuites.patch @ 1002:e9ff3107b885

Fix windows build of force-ciphersuites patch
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 02 Sep 2014 10:46:13 +0200
parents c6c8f4ce48f8
children 93325618ac7b
comparison
equal deleted inserted replaced
1001:0b7bb4f68f5a 1002:e9ff3107b885
1 From 7b70a13b983979ccf7a672c0065c232cd7dc0c37 Mon Sep 17 00:00:00 2001 1 From a36ec2b65e81109c151759b282c221daf91b83ee Mon Sep 17 00:00:00 2001
2 From: Andre Heinecke <aheinecke@intevation.de> 2 From: Andre Heinecke <aheinecke@intevation.de>
3 Date: Tue, 2 Sep 2014 09:48:01 +0200 3 Date: Tue, 2 Sep 2014 09:58:44 +0200
4 Subject: [PATCH] Add possibility to force polarssl ciphersuites. 4 Subject: [PATCH] Add possibility to force polarssl ciphersuites.
5 5
6 --- 6 ---
7 lib/vtls/polarssl.c | 40 ++++++++++++++++++++++++++++++++++++++-- 7 lib/vtls/polarssl.c | 41 +++++++++++++++++++++++++++++++++++++++--
8 1 file changed, 38 insertions(+), 2 deletions(-) 8 1 file changed, 39 insertions(+), 2 deletions(-)
9 9
10 diff --git a/lib/vtls/polarssl.c b/lib/vtls/polarssl.c 10 diff --git a/lib/vtls/polarssl.c b/lib/vtls/polarssl.c
11 index 2c40e36..e0cfb90 100644 11 index 2c40e36..c3f1b8e 100644
12 --- a/lib/vtls/polarssl.c 12 --- a/lib/vtls/polarssl.c
13 +++ b/lib/vtls/polarssl.c 13 +++ b/lib/vtls/polarssl.c
14 @@ -67,6 +67,8 @@ 14 @@ -55,6 +55,7 @@
15 #include "select.h"
16 #include "rawstr.h"
17 #include "polarssl_threadlock.h"
18 +#include "strtok.h"
19
20 #define _MPRINTF_REPLACE /* use our functions only */
21 #include <curl/mprintf.h>
22 @@ -67,6 +68,8 @@
15 #define THREADING_SUPPORT 23 #define THREADING_SUPPORT
16 #endif 24 #endif
17 25
18 +#define MAX_CIPHERSUITES 255 26 +#define MAX_CIPHERSUITES 255
19 + 27 +
20 #if defined(THREADING_SUPPORT) 28 #if defined(THREADING_SUPPORT)
21 static entropy_context entropy; 29 static entropy_context entropy;
22 30
23 @@ -129,7 +131,7 @@ static void polarssl_debug(void *context, int level, const char *line) 31 @@ -129,7 +132,7 @@ static void polarssl_debug(void *context, int level, const char *line)
24 32
25 static Curl_recv polarssl_recv; 33 static Curl_recv polarssl_recv;
26 static Curl_send polarssl_send; 34 static Curl_send polarssl_send;
27 - 35 -
28 +static int ciphersuites[MAX_CIPHERSUITES + 1]; 36 +static int ciphersuites[MAX_CIPHERSUITES + 1];
29 37
30 static CURLcode 38 static CURLcode
31 polarssl_connect_step1(struct connectdata *conn, 39 polarssl_connect_step1(struct connectdata *conn,
32 @@ -300,7 +302,41 @@ polarssl_connect_step1(struct connectdata *conn, 40 @@ -300,7 +303,41 @@ polarssl_connect_step1(struct connectdata *conn,
33 net_recv, &conn->sock[sockindex], 41 net_recv, &conn->sock[sockindex],
34 net_send, &conn->sock[sockindex]); 42 net_send, &conn->sock[sockindex]);
35 43
36 - ssl_set_ciphersuites(&connssl->ssl, ssl_list_ciphersuites()); 44 - ssl_set_ciphersuites(&connssl->ssl, ssl_list_ciphersuites());
37 + if(!data->set.str[STRING_SSL_CIPHER_LIST]) 45 + if(!data->set.str[STRING_SSL_CIPHER_LIST])

http://wald.intevation.org/projects/trustbridge/