[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] branch master updated: add extra check, mak
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] branch master updated: add extra check, make it work with OpenSSL 1.1, eliminate dead code, some formatting |
Date: |
Tue, 14 Feb 2017 16:58:17 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository libmicrohttpd.
The following commit(s) were added to refs/heads/master by this push:
new 73e42331 add extra check, make it work with OpenSSL 1.1, eliminate
dead code, some formatting
73e42331 is described below
commit 73e423312cc7a32f5a260ec7992ed5a15abd4858
Author: Christian Grothoff <address@hidden>
AuthorDate: Tue Feb 14 16:59:10 2017 +0100
add extra check, make it work with OpenSSL 1.1, eliminate dead code, some
formatting
---
src/microhttpd/response.c | 1 +
src/microhttpd/test_upgrade.c | 40 +++++++---------------------------------
2 files changed, 8 insertions(+), 33 deletions(-)
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c
index 86e3f325..4ea251d3 100644
--- a/src/microhttpd/response.c
+++ b/src/microhttpd/response.c
@@ -668,6 +668,7 @@ MHD_upgrade_action (struct MHD_UpgradeResponseHandle *urh,
/* transition to special 'closed' state for start of cleanup */
urh->was_closed = true;
+ EXTRA_CHECK (MHD_CONNECTION_UPGRADE == connection->state);
connection->state = MHD_CONNECTION_UPGRADE_CLOSED;
/* As soon as connection will be marked with BOTH
* 'urh->was_closed' AND 'urh->clean_ready', it will
diff --git a/src/microhttpd/test_upgrade.c b/src/microhttpd/test_upgrade.c
index 695a5e73..01e963f1 100644
--- a/src/microhttpd/test_upgrade.c
+++ b/src/microhttpd/test_upgrade.c
@@ -132,7 +132,7 @@ gnutlscli_connect (int *sock,
"-connect",
destination,
"-verify",
- "0",
+ "1",
(char *) NULL);
}
_exit (1);
@@ -396,39 +396,12 @@ static ssize_t wr_recv(wr_socket s, void *buf, size_t len)
/**
- * Perform shutdown of TCP socket for plain sockets or
- * shutdown of TLS layer for TLS sockets.
- * @param s the socket to shutdown
- * @param how SHUT_WR or SHUT_RDWR
- * @return zero on succeed, -1 otherwise
- */
-static int wr_shutdown(wr_socket s, int how)
-{
- if (wr_plain == s->t)
- return shutdown (s->fd, how);
-#ifdef HTTPS_SUPPORT
- if (wr_tls == s->t)
- {
- ssize_t ret;
- if (SHUT_WR == how)
- ret = gnutls_bye (s->tls_s, GNUTLS_SHUT_WR);
- else
- ret = gnutls_bye (s->tls_s, GNUTLS_SHUT_RDWR);
-
- if (GNUTLS_E_SUCCESS == ret)
- return 0;
- }
-#endif /* HTTPS_SUPPORT */
- return -1;
-}
-
-
-/**
* Close socket and release allocated resourced
* @param s the socket to close
* @return zero on succeed, -1 otherwise
*/
-static int wr_close(wr_socket s)
+static int
+wr_close(wr_socket s)
{
int ret = (MHD_socket_close_(s->fd)) ? 0 : -1;
#ifdef HTTPS_SUPPORT
@@ -1130,12 +1103,13 @@ main (int argc,
abort ();
}
}
- if (TLS_LIB_GNUTLS == use_tls_tool && GNUTLS_E_SUCCESS !=
gnutls_global_init())
+ if ( (TLS_LIB_GNUTLS == use_tls_tool) &&
+ (GNUTLS_E_SUCCESS != gnutls_global_init()) )
abort ();
#else /* ! HTTPS_SUPPORT */
fprintf (stderr, "HTTPS support was disabled by configure.\n");
- return 99;
+ return 77;
#endif /* ! HTTPS_SUPPORT */
}
@@ -1260,7 +1234,7 @@ main (int argc,
"Error (code: %u)\n",
error_count);
#ifdef HTTPS_SUPPORT
- if (test_tls && TLS_LIB_GNUTLS == use_tls_tool)
+ if (test_tls && (TLS_LIB_GNUTLS == use_tls_tool))
gnutls_global_deinit();
#endif /* HTTPS_SUPPORT */
return error_count != 0; /* 0 == pass */
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [libmicrohttpd] branch master updated: add extra check, make it work with OpenSSL 1.1, eliminate dead code, some formatting,
gnunet <=