aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-04-06 22:18:40 +0000
committerChristian Grothoff <christian@grothoff.org>2015-04-06 22:18:40 +0000
commitf88e041ca019e8036c5512c7bff2e9626006c59d (patch)
tree624cd06eda362ea89fa7e7933c5d8d8d4abfbf3d
parent334974b4b18840b88c3332ba68863f6c9394b46d (diff)
downloadlibmicrohttpd-f88e041ca019e8036c5512c7bff2e9626006c59d.tar.gz
libmicrohttpd-f88e041ca019e8036c5512c7bff2e9626006c59d.zip
tolerate TLS 1.1 / 1.2 disagreement
-rw-r--r--ChangeLog3
-rw-r--r--src/include/microhttpd.h4
-rw-r--r--src/testcurl/https/test_https_session_info.c24
3 files changed, 23 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index b3c7a79e..cb9f7842 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
1Tue Apr 7 00:12:36 CEST 2015
2 Releasing libmicrohttpd 0.9.40. -CG
3
1Sat Apr 4 18:28:24 CEST 2015 4Sat Apr 4 18:28:24 CEST 2015
2 Fix potential deadlock issue in MHD_USE_THREAD_PER_CONNECTION 5 Fix potential deadlock issue in MHD_USE_THREAD_PER_CONNECTION
3 mode if shutdown is initiated while connections are active. -CG 6 mode if shutdown is initiated while connections are active. -CG
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index 12e447c5..901889d4 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -1,6 +1,6 @@
1/* 1/*
2 This file is part of libmicrohttpd 2 This file is part of libmicrohttpd
3 Copyright (C) 2006-2014 Christian Grothoff (and other contributing authors) 3 Copyright (C) 2006-2015 Christian Grothoff (and other contributing authors)
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public 6 modify it under the terms of the GNU Lesser General Public
@@ -130,7 +130,7 @@ typedef intptr_t ssize_t;
130 * Current version of the library. 130 * Current version of the library.
131 * 0x01093001 = 1.9.30-1. 131 * 0x01093001 = 1.9.30-1.
132 */ 132 */
133#define MHD_VERSION 0x00093907 133#define MHD_VERSION 0x00094000
134 134
135/** 135/**
136 * MHD-internal return code for "YES". 136 * MHD-internal return code for "YES".
diff --git a/src/testcurl/https/test_https_session_info.c b/src/testcurl/https/test_https_session_info.c
index 366fabdb..8dac2533 100644
--- a/src/testcurl/https/test_https_session_info.c
+++ b/src/testcurl/https/test_https_session_info.c
@@ -48,22 +48,34 @@ query_session_ahc (void *cls, struct MHD_Connection *connection,
48{ 48{
49 struct MHD_Response *response; 49 struct MHD_Response *response;
50 int ret; 50 int ret;
51 51
52 if (NULL == *ptr) 52 if (NULL == *ptr)
53 { 53 {
54 *ptr = &query_session_ahc; 54 *ptr = &query_session_ahc;
55 return MHD_YES; 55 return MHD_YES;
56 } 56 }
57 57
58 if (GNUTLS_TLS1_1 != 58 if (GNUTLS_TLS1_1 !=
59 (ret = MHD_get_connection_info 59 (ret = MHD_get_connection_info
60 (connection, 60 (connection,
61 MHD_CONNECTION_INFO_PROTOCOL)->protocol)) 61 MHD_CONNECTION_INFO_PROTOCOL)->protocol))
62 { 62 {
63 fprintf (stderr, "Error: requested protocol mismatch (wanted %d, got %d)\n", 63 if (GNUTLS_TLS1_2 == ret)
64 GNUTLS_SSL3, 64 {
65 ret); 65 /* as usual, TLS implementations sometimes don't
66 return -1; 66 quite do what was asked, just mildly complain... */
67 fprintf (stderr,
68 "Warning: requested TLS 1.1, got TLS 1.2\n");
69 }
70 else
71 {
72 /* really different version... */
73 fprintf (stderr,
74 "Error: requested protocol mismatch (wanted %d, got %d)\n",
75 GNUTLS_TLS1_1,
76 ret);
77 return -1;
78 }
67 } 79 }
68 80
69 response = MHD_create_response_from_buffer (strlen (EMPTY_PAGE), 81 response = MHD_create_response_from_buffer (strlen (EMPTY_PAGE),