[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r7931 - in libmicrohttpd/src: daemon daemon/https/lgl daemo
From: |
gnunet |
Subject: |
[GNUnet-SVN] r7931 - in libmicrohttpd/src: daemon daemon/https/lgl daemon/https/tls daemon/https/x509 examples include testcurl/https |
Date: |
Mon, 17 Nov 2008 00:49:17 -0700 (MST) |
Author: grothoff
Date: 2008-11-17 00:49:16 -0700 (Mon, 17 Nov 2008)
New Revision: 7931
Modified:
libmicrohttpd/src/daemon/connection.c
libmicrohttpd/src/daemon/connection.h
libmicrohttpd/src/daemon/connection_https.c
libmicrohttpd/src/daemon/daemon.c
libmicrohttpd/src/daemon/https/lgl/gc-libgcrypt.c
libmicrohttpd/src/daemon/https/tls/auth_rsa.c
libmicrohttpd/src/daemon/https/tls/debug.c
libmicrohttpd/src/daemon/https/tls/ext_cert_type.c
libmicrohttpd/src/daemon/https/tls/ext_max_record.c
libmicrohttpd/src/daemon/https/tls/ext_server_name.c
libmicrohttpd/src/daemon/https/tls/gnutls_algorithms.c
libmicrohttpd/src/daemon/https/tls/gnutls_auth.c
libmicrohttpd/src/daemon/https/tls/gnutls_buffers.c
libmicrohttpd/src/daemon/https/tls/gnutls_cert.c
libmicrohttpd/src/daemon/https/tls/gnutls_cipher.c
libmicrohttpd/src/daemon/https/tls/gnutls_constate.c
libmicrohttpd/src/daemon/https/tls/gnutls_errors.c
libmicrohttpd/src/daemon/https/tls/gnutls_extensions.c
libmicrohttpd/src/daemon/https/tls/gnutls_handshake.c
libmicrohttpd/src/daemon/https/tls/gnutls_kx.c
libmicrohttpd/src/daemon/https/tls/gnutls_record.c
libmicrohttpd/src/daemon/https/tls/gnutls_sig.c
libmicrohttpd/src/daemon/https/tls/gnutls_state.c
libmicrohttpd/src/daemon/https/tls/gnutls_str.c
libmicrohttpd/src/daemon/https/tls/gnutls_ui.c
libmicrohttpd/src/daemon/https/tls/gnutls_x509.c
libmicrohttpd/src/daemon/https/x509/common.c
libmicrohttpd/src/daemon/https/x509/extensions.c
libmicrohttpd/src/daemon/https/x509/mpi.c
libmicrohttpd/src/daemon/https/x509/mpi.h
libmicrohttpd/src/daemon/https/x509/x509.c
libmicrohttpd/src/daemon/https/x509/x509_privkey.c
libmicrohttpd/src/daemon/internal.h
libmicrohttpd/src/examples/minimal_example_comet.c
libmicrohttpd/src/include/microhttpd.h
libmicrohttpd/src/testcurl/https/mhds_session_info_test.c
libmicrohttpd/src/testcurl/https/tls_alert_test.c
libmicrohttpd/src/testcurl/https/tls_cipher_change_test.c
libmicrohttpd/src/testcurl/https/tls_daemon_options_test.c
libmicrohttpd/src/testcurl/https/tls_session_time_out_test.c
Log:
indent
Modified: libmicrohttpd/src/daemon/connection.c
===================================================================
--- libmicrohttpd/src/daemon/connection.c 2008-11-17 07:48:51 UTC (rev
7930)
+++ libmicrohttpd/src/daemon/connection.c 2008-11-17 07:49:16 UTC (rev
7931)
@@ -278,9 +278,9 @@
* Close the given connection and give the
* specified termination code to the user.
*/
-void
+void
MHD_connection_close (struct MHD_Connection *connection,
- enum MHD_RequestTerminationCode termination_code)
+ enum MHD_RequestTerminationCode termination_code)
{
SHUTDOWN (connection->socket_fd, SHUT_RDWR);
@@ -288,9 +288,8 @@
connection->socket_fd = -1;
connection->state = MHD_CONNECTION_CLOSED;
if (connection->daemon->notify_completed != NULL)
- connection->daemon->notify_completed (connection->
- daemon->notify_completed_cls,
- connection,
+ connection->daemon->notify_completed (connection->daemon->
+ notify_completed_cls, connection,
&connection->client_context,
termination_code);
}
@@ -302,8 +301,7 @@
static void
connection_close_error (struct MHD_Connection *connection)
{
- MHD_connection_close(connection,
- MHD_REQUEST_TERMINATED_WITH_ERROR);
+ MHD_connection_close (connection, MHD_REQUEST_TERMINATED_WITH_ERROR);
}
/**
@@ -1038,9 +1036,10 @@
httpVersion++;
}
if (connection->daemon->uri_log_callback != NULL)
- connection->client_context
- =
connection->daemon->uri_log_callback(connection->daemon->uri_log_callback_cls,
- uri);
+ connection->client_context
+ =
+ connection->daemon->uri_log_callback (connection->daemon->
+ uri_log_callback_cls, uri);
args = strstr (uri, "?");
if (args != NULL)
{
@@ -1188,8 +1187,8 @@
}
used = processed;
if (MHD_NO ==
- connection->daemon->default_handler (connection->
- daemon->default_handler_cls,
+ connection->daemon->default_handler (connection->daemon->
+ default_handler_cls,
connection, connection->url,
connection->method,
connection->version,
@@ -1240,8 +1239,9 @@
return MHD_NO;
bytes_read = connection->recv_cls (connection,
- &connection->read_buffer[connection->
-
read_buffer_offset],
+ &connection->
+ read_buffer
+ [connection->read_buffer_offset],
connection->read_buffer_size -
connection->read_buffer_offset);
if (bytes_read < 0)
@@ -1590,11 +1590,9 @@
case MHD_CONNECTION_CONTINUE_SENDING:
ret = connection->send_cls (connection,
&HTTP_100_CONTINUE
- [connection->
- continue_message_write_offset],
+
[connection->continue_message_write_offset],
strlen (HTTP_100_CONTINUE) -
- connection->
- continue_message_write_offset);
+
connection->continue_message_write_offset);
if (ret < 0)
{
if (errno == EINTR)
@@ -1644,25 +1642,23 @@
{
ret = MHD__gnutls_record_send (connection->tls_session,
&connection->response->data
-
[connection->response_write_position
- - response->data_start],
- response->data_size -
- (connection->
+ [connection->
response_write_position -
- response->data_start));
+ response->data_start],
+ response->data_size -
+
(connection->response_write_position
+ - response->data_start));
}
else
#endif
{
ret = connection->send_cls (connection,
- &response->
- data
+ &response->data
[connection->response_write_position
- response->data_start],
response->data_size -
- (connection->
- response_write_position -
- response->data_start));
+ (connection->response_write_position
+ - response->data_start));
}
#if DEBUG_SEND_DATA
if (ret > 0)
@@ -1943,7 +1939,8 @@
/* starting header send, set TCP cork */
{
const int val = 1;
- setsockopt(connection->socket_fd, IPPROTO_TCP, TCP_CORK, &val,
sizeof(val));
+ setsockopt (connection->socket_fd, IPPROTO_TCP, TCP_CORK, &val,
+ sizeof (val));
}
#endif
break;
@@ -2005,13 +2002,14 @@
/* done sending, uncork */
{
const int val = 0;
- setsockopt(connection->socket_fd, IPPROTO_TCP, TCP_CORK, &val,
sizeof(val));
+ setsockopt (connection->socket_fd, IPPROTO_TCP, TCP_CORK, &val,
+ sizeof (val));
}
#endif
MHD_destroy_response (connection->response);
if (connection->daemon->notify_completed != NULL)
- connection->daemon->notify_completed (connection->
- daemon->notify_completed_cls,
+ connection->daemon->notify_completed (connection->daemon->
+ notify_completed_cls,
connection,
&connection->client_context,
MHD_REQUEST_TERMINATED_COMPLETED_OK);
Modified: libmicrohttpd/src/daemon/connection.h
===================================================================
--- libmicrohttpd/src/daemon/connection.h 2008-11-17 07:48:51 UTC (rev
7930)
+++ libmicrohttpd/src/daemon/connection.h 2008-11-17 07:49:16 UTC (rev
7931)
@@ -53,6 +53,6 @@
* specified termination code to the user.
*/
void MHD_connection_close (struct MHD_Connection *connection,
- enum MHD_RequestTerminationCode termination_code);
+ enum MHD_RequestTerminationCode termination_code);
#endif
Modified: libmicrohttpd/src/daemon/connection_https.c
===================================================================
--- libmicrohttpd/src/daemon/connection_https.c 2008-11-17 07:48:51 UTC (rev
7930)
+++ libmicrohttpd/src/daemon/connection_https.c 2008-11-17 07:49:16 UTC (rev
7931)
@@ -58,26 +58,26 @@
{
#if HTTPS_SUPPORT
case MHD_CONNECTION_INFO_CIPHER_ALGO:
- return (const union MHD_ConnectionInfo *) &connection->tls_session->
- security_parameters.read_bulk_cipher_algorithm;
+ return (const union MHD_ConnectionInfo *) &connection->
+ tls_session->security_parameters.read_bulk_cipher_algorithm;
case MHD_CONNECTION_INFO_KX_ALGO:
- return (const union MHD_ConnectionInfo *) &connection->tls_session->
- security_parameters.kx_algorithm;
+ return (const union MHD_ConnectionInfo *) &connection->
+ tls_session->security_parameters.kx_algorithm;
case MHD_CONNECTION_INFO_CREDENTIALS_TYPE:
- return (const union MHD_ConnectionInfo *) &connection->tls_session->
- key->cred->algorithm;
+ return (const union MHD_ConnectionInfo *) &connection->
+ tls_session->key->cred->algorithm;
case MHD_CONNECTION_INFO_MAC_ALGO:
- return (const union MHD_ConnectionInfo *) &connection->tls_session->
- security_parameters.read_mac_algorithm;
+ return (const union MHD_ConnectionInfo *) &connection->
+ tls_session->security_parameters.read_mac_algorithm;
case MHD_CONNECTION_INFO_COMPRESSION_METHOD:
- return (const union MHD_ConnectionInfo *) &connection->tls_session->
- security_parameters.read_compression_algorithm;
+ return (const union MHD_ConnectionInfo *) &connection->
+ tls_session->security_parameters.read_compression_algorithm;
case MHD_CONNECTION_INFO_PROTOCOL:
- return (const union MHD_ConnectionInfo *) &connection->tls_session->
- security_parameters.version;
+ return (const union MHD_ConnectionInfo *) &connection->
+ tls_session->security_parameters.version;
case MHD_CONNECTION_INFO_CERT_TYPE:
- return (const union MHD_ConnectionInfo *) &connection->tls_session->
- security_parameters.cert_type;
+ return (const union MHD_ConnectionInfo *) &connection->
+ tls_session->security_parameters.cert_type;
#endif
default:
return NULL;
@@ -100,8 +100,7 @@
{
MHD__gnutls_bye (connection->tls_session, GNUTLS_SHUT_WR);
connection->tls_session->internals.read_eof = 1;
- MHD_connection_close(connection,
- termination_code);
+ MHD_connection_close (connection, termination_code);
}
/**
@@ -261,9 +260,9 @@
#if HAVE_MESSAGES
MHD_DLOG (connection->daemon,
"Received TLS alert: %s\n",
- MHD__gnutls_alert_get_name ((int) connection->
- tls_session->internals.
- last_alert));
+ MHD__gnutls_alert_get_name ((int)
+ connection->tls_session->
+ internals.last_alert));
#endif
return MHD_YES;
}
Modified: libmicrohttpd/src/daemon/daemon.c
===================================================================
--- libmicrohttpd/src/daemon/daemon.c 2008-11-17 07:48:51 UTC (rev 7930)
+++ libmicrohttpd/src/daemon/daemon.c 2008-11-17 07:49:16 UTC (rev 7931)
@@ -274,8 +274,7 @@
"Processing thread terminating, closing connection\n");
#endif
#endif
- MHD_connection_close(con,
- MHD_REQUEST_TERMINATED_DAEMON_SHUTDOWN);
+ MHD_connection_close (con, MHD_REQUEST_TERMINATED_DAEMON_SHUTDOWN);
}
return NULL;
}
@@ -870,10 +869,11 @@
case MHD_OPTION_SOCK_ADDR:
servaddr = va_arg (ap, struct sockaddr *);
break;
- case MHD_OPTION_URI_LOG_CALLBACK:
- retVal->uri_log_callback = va_arg(ap, void* (*)(void * cls, const
char* uri));
- retVal->uri_log_callback_cls = va_arg(ap, void*);
- break;
+ case MHD_OPTION_URI_LOG_CALLBACK:
+ retVal->uri_log_callback =
+ va_arg (ap, void *(*)(void *cls, const char *uri));
+ retVal->uri_log_callback_cls = va_arg (ap, void *);
+ break;
#if HTTPS_SUPPORT
case MHD_OPTION_PROTOCOL_VERSION:
_set_priority (&retVal->priority_cache->protocol,
@@ -1068,8 +1068,8 @@
MHD_DLOG (daemon, "MHD shutdown, closing active connections\n");
#endif
#endif
- MHD_connection_close(daemon->connections,
- MHD_REQUEST_TERMINATED_DAEMON_SHUTDOWN);
+ MHD_connection_close (daemon->connections,
+ MHD_REQUEST_TERMINATED_DAEMON_SHUTDOWN);
}
MHD_cleanup_connections (daemon);
}
Modified: libmicrohttpd/src/daemon/https/lgl/gc-libgcrypt.c
===================================================================
--- libmicrohttpd/src/daemon/https/lgl/gc-libgcrypt.c 2008-11-17 07:48:51 UTC
(rev 7930)
+++ libmicrohttpd/src/daemon/https/lgl/gc-libgcrypt.c 2008-11-17 07:49:16 UTC
(rev 7931)
@@ -405,4 +405,3 @@
free (ctx);
}
-
Modified: libmicrohttpd/src/daemon/https/tls/auth_rsa.c
===================================================================
--- libmicrohttpd/src/daemon/https/tls/auth_rsa.c 2008-11-17 07:48:51 UTC
(rev 7930)
+++ libmicrohttpd/src/daemon/https/tls/auth_rsa.c 2008-11-17 07:49:16 UTC
(rev 7931)
@@ -168,8 +168,8 @@
}
bits =
- MHD__gnutls_mpi_get_nbits (session->internals.
- selected_cert_list[0].params[0]);
+ MHD__gnutls_mpi_get_nbits (session->internals.selected_cert_list[0].
+ params[0]);
if (MHD_gtls_cipher_suite_get_kx_algo
(&session->security_parameters.current_cipher_suite)
Modified: libmicrohttpd/src/daemon/https/tls/debug.c
===================================================================
--- libmicrohttpd/src/daemon/https/tls/debug.c 2008-11-17 07:48:51 UTC (rev
7930)
+++ libmicrohttpd/src/daemon/https/tls/debug.c 2008-11-17 07:49:16 UTC (rev
7931)
@@ -93,4 +93,3 @@
}
}
-
Modified: libmicrohttpd/src/daemon/https/tls/ext_cert_type.c
===================================================================
--- libmicrohttpd/src/daemon/https/tls/ext_cert_type.c 2008-11-17 07:48:51 UTC
(rev 7930)
+++ libmicrohttpd/src/daemon/https/tls/ext_cert_type.c 2008-11-17 07:49:16 UTC
(rev 7931)
@@ -183,8 +183,8 @@
for (i = 0; i < len; i++)
{
data[i + 1] =
- MHD__gnutls_cert_type2num (session->internals.priorities.
- cert_type.priority[i]);
+ MHD__gnutls_cert_type2num (session->internals.
+ priorities.cert_type.priority[i]);
}
return len + 1;
}
@@ -203,8 +203,8 @@
}
data[0] =
- MHD__gnutls_cert_type2num (session->security_parameters.
- cert_type);
+ MHD__gnutls_cert_type2num (session->
+ security_parameters.cert_type);
return len;
}
Modified: libmicrohttpd/src/daemon/https/tls/ext_max_record.c
===================================================================
--- libmicrohttpd/src/daemon/https/tls/ext_max_record.c 2008-11-17 07:48:51 UTC
(rev 7930)
+++ libmicrohttpd/src/daemon/https/tls/ext_max_record.c 2008-11-17 07:49:16 UTC
(rev 7931)
@@ -121,8 +121,8 @@
}
data[0] =
- (uint8_t) MHD_gtls_mre_record2num (session->
- internals.proposed_record_size);
+ (uint8_t) MHD_gtls_mre_record2num (session->internals.
+ proposed_record_size);
return len;
}
Modified: libmicrohttpd/src/daemon/https/tls/ext_server_name.c
===================================================================
--- libmicrohttpd/src/daemon/https/tls/ext_server_name.c 2008-11-17
07:48:51 UTC (rev 7930)
+++ libmicrohttpd/src/daemon/https/tls/ext_server_name.c 2008-11-17
07:49:16 UTC (rev 7931)
@@ -104,12 +104,12 @@
case 0: /* NAME_DNS */
if (len <= MAX_SERVER_NAME_SIZE)
{
- memcpy (session->security_parameters.
- extensions.server_names[i].name, p, len);
- session->security_parameters.extensions.server_names[i].
- name_length = len;
- session->security_parameters.extensions.server_names[i].
- type = GNUTLS_NAME_DNS;
+ memcpy (session->security_parameters.extensions.
+ server_names[i].name, p, len);
+ session->security_parameters.extensions.
+ server_names[i].name_length = len;
+ session->security_parameters.extensions.
+ server_names[i].type = GNUTLS_NAME_DNS;
break;
}
}
@@ -150,8 +150,8 @@
/* count the total size
*/
len =
- session->security_parameters.extensions.
- server_names[i].name_length;
+ session->security_parameters.extensions.server_names[i].
+ name_length;
/* uint8_t + uint16_t + size
*/
@@ -170,14 +170,14 @@
i < session->security_parameters.extensions.server_names_size; i++)
{
- switch (session->security_parameters.extensions.server_names[i].
- type)
+ switch (session->security_parameters.extensions.
+ server_names[i].type)
{
case GNUTLS_NAME_DNS:
len =
- session->security_parameters.extensions.server_names[i].
- name_length;
+ session->security_parameters.extensions.
+ server_names[i].name_length;
if (len == 0)
break;
@@ -195,8 +195,8 @@
p += 2;
memcpy (p,
- session->security_parameters.extensions.server_names[0].
- name, len);
+ session->security_parameters.extensions.
+ server_names[0].name, len);
p += len;
break;
default:
@@ -208,4 +208,3 @@
#endif
return total_size;
}
-
Modified: libmicrohttpd/src/daemon/https/tls/gnutls_algorithms.c
===================================================================
--- libmicrohttpd/src/daemon/https/tls/gnutls_algorithms.c 2008-11-17
07:48:51 UTC (rev 7930)
+++ libmicrohttpd/src/daemon/https/tls/gnutls_algorithms.c 2008-11-17
07:49:16 UTC (rev 7931)
@@ -330,17 +330,14 @@
MHD_gnutls_compression_entry
MHD__gnutls_compression_algorithms[MAX_COMP_METHODS] =
- { GNUTLS_COMPRESSION_ENTRY (MHD_GNUTLS_COMP_NULL, 0x00, 0, 0, 0),
+{
+ GNUTLS_COMPRESSION_ENTRY (MHD_GNUTLS_COMP_NULL, 0x00, 0, 0, 0),
#ifdef HAVE_LIBZ
- /* draft-ietf-tls-compression-02 */
- GNUTLS_COMPRESSION_ENTRY (MHD_GNUTLS_COMP_DEFLATE, 0x01, 15, 8, 3),
+ /* draft-ietf-tls-compression-02 */
+ GNUTLS_COMPRESSION_ENTRY (MHD_GNUTLS_COMP_DEFLATE, 0x01, 15, 8, 3),
#endif
- {0,
- 0,
- 0,
- 0,
- 0,
- 0}
+ {
+ 0, 0, 0, 0, 0, 0}
};
static const enum MHD_GNUTLS_CompressionMethod
@@ -1342,8 +1339,8 @@
for (i = j = 0; i < SUPPORTED_COMPRESSION_METHODS; i++)
{
int tmp =
- MHD_gtls_compression_get_num (session->internals.
- priorities.compression.priority[i]);
+ MHD_gtls_compression_get_num (session->internals.priorities.
+ compression.priority[i]);
/* remove private compression algorithms, if requested.
*/
@@ -1493,4 +1490,3 @@
return ret;
}
-
Modified: libmicrohttpd/src/daemon/https/tls/gnutls_auth.c
===================================================================
--- libmicrohttpd/src/daemon/https/tls/gnutls_auth.c 2008-11-17 07:48:51 UTC
(rev 7930)
+++ libmicrohttpd/src/daemon/https/tls/gnutls_auth.c 2008-11-17 07:49:16 UTC
(rev 7931)
@@ -166,9 +166,8 @@
return
MHD_gtls_map_kx_get_cred (MHD_gtls_cipher_suite_get_kx_algo
- (&session->
- security_parameters.current_cipher_suite),
- server);
+ (&session->security_parameters.
+ current_cipher_suite), server);
}
/*
Modified: libmicrohttpd/src/daemon/https/tls/gnutls_buffers.c
===================================================================
--- libmicrohttpd/src/daemon/https/tls/gnutls_buffers.c 2008-11-17 07:48:51 UTC
(rev 7930)
+++ libmicrohttpd/src/daemon/https/tls/gnutls_buffers.c 2008-11-17 07:49:16 UTC
(rev 7931)
@@ -738,9 +738,9 @@
session->internals.record_send_buffer_prev_size += n - left;
retval =
- MHD__gnutls_buffer_insert (&session->internals.
- record_send_buffer, &ptr[n - left],
- left);
+ MHD__gnutls_buffer_insert (&session->
+ internals.record_send_buffer,
+ &ptr[n - left], left);
if (retval < 0)
{
MHD_gnutls_assert ();
@@ -948,8 +948,8 @@
MHD_gnutls_assert ();
retval =
- MHD__gnutls_buffer_insert (&session->
- internals.handshake_send_buffer,
+ MHD__gnutls_buffer_insert (&session->internals.
+ handshake_send_buffer,
&ptr[n - left], left);
if (retval < 0)
{
@@ -1051,9 +1051,8 @@
session->internals.handshake_recv_buffer.data
=
- MHD_gtls_realloc_fast (session->
- internals.handshake_recv_buffer.data,
- dsize);
+ MHD_gtls_realloc_fast (session->internals.
+ handshake_recv_buffer.data, dsize);
if (session->internals.handshake_recv_buffer.data == NULL)
{
MHD_gnutls_assert ();
@@ -1104,9 +1103,13 @@
if ((session->internals.max_handshake_data_buffer_size > 0) && ((length
+
-
session->internals.handshake_hash_buffer.length)
- >
-
session->internals.max_handshake_data_buffer_size))
+ session->
+ internals.
+
handshake_hash_buffer.
+ length) >
+ session->
+ internals.
+
max_handshake_data_buffer_size))
{
MHD_gnutls_assert ();
return GNUTLS_E_MEMORY_ERROR;
Modified: libmicrohttpd/src/daemon/https/tls/gnutls_cert.c
===================================================================
--- libmicrohttpd/src/daemon/https/tls/gnutls_cert.c 2008-11-17 07:48:51 UTC
(rev 7930)
+++ libmicrohttpd/src/daemon/https/tls/gnutls_cert.c 2008-11-17 07:49:16 UTC
(rev 7931)
@@ -439,4 +439,3 @@
MHD__gnutls_free_datum (&cert->raw);
}
-
Modified: libmicrohttpd/src/daemon/https/tls/gnutls_cipher.c
===================================================================
--- libmicrohttpd/src/daemon/https/tls/gnutls_cipher.c 2008-11-17 07:48:51 UTC
(rev 7930)
+++ libmicrohttpd/src/daemon/https/tls/gnutls_cipher.c 2008-11-17 07:49:16 UTC
(rev 7931)
@@ -302,15 +302,15 @@
uint8_t type = _type;
uint8_t major, minor;
int hash_size =
- MHD_gnutls_hash_get_algo_len (session->
- security_parameters.write_mac_algorithm);
+ MHD_gnutls_hash_get_algo_len (session->security_parameters.
+ write_mac_algorithm);
enum MHD_GNUTLS_Protocol ver;
int blocksize =
- MHD_gtls_cipher_get_block_size (session->
-
security_parameters.write_bulk_cipher_algorithm);
+ MHD_gtls_cipher_get_block_size (session->security_parameters.
+ write_bulk_cipher_algorithm);
cipher_type_t block_algo =
- MHD_gtls_cipher_is_block (session->
- security_parameters.write_bulk_cipher_algorithm);
+ MHD_gtls_cipher_is_block (session->security_parameters.
+ write_bulk_cipher_algorithm);
opaque *data_ptr;
@@ -337,9 +337,8 @@
if (td != GNUTLS_MAC_FAILED)
{ /* actually when the algorithm in not the NULL
one */
MHD_gnutls_hash (td,
- UINT64DATA (session->
- connection_state.write_sequence_number),
- 8);
+ UINT64DATA (session->connection_state.
+ write_sequence_number), 8);
MHD_gnutls_hash (td, &type, 1);
if (ver >= MHD_GNUTLS_PROTOCOL_TLS1_0)
@@ -433,16 +432,16 @@
uint8_t major, minor;
enum MHD_GNUTLS_Protocol ver;
int hash_size =
- MHD_gnutls_hash_get_algo_len (session->
- security_parameters.read_mac_algorithm);
+ MHD_gnutls_hash_get_algo_len (session->security_parameters.
+ read_mac_algorithm);
ver = MHD__gnutls_protocol_get_version (session);
minor = MHD_gtls_version_get_minor (ver);
major = MHD_gtls_version_get_major (ver);
blocksize =
- MHD_gtls_cipher_get_block_size (session->
-
security_parameters.read_bulk_cipher_algorithm);
+ MHD_gtls_cipher_get_block_size (session->security_parameters.
+ read_bulk_cipher_algorithm);
/* initialize MAC
*/
@@ -466,9 +465,9 @@
{
case CIPHER_STREAM:
if ((ret =
- MHD_gtls_cipher_decrypt (session->
- connection_state.read_cipher_state,
- ciphertext.data, ciphertext.size)) < 0)
+ MHD_gtls_cipher_decrypt (session->connection_state.
+ read_cipher_state, ciphertext.data,
+ ciphertext.size)) < 0)
{
MHD_gnutls_assert ();
return ret;
@@ -485,9 +484,9 @@
}
if ((ret =
- MHD_gtls_cipher_decrypt (session->
- connection_state.read_cipher_state,
- ciphertext.data, ciphertext.size)) < 0)
+ MHD_gtls_cipher_decrypt (session->connection_state.
+ read_cipher_state, ciphertext.data,
+ ciphertext.size)) < 0)
{
MHD_gnutls_assert ();
return ret;
@@ -545,8 +544,8 @@
if (td != GNUTLS_MAC_FAILED)
{
MHD_gnutls_hash (td,
- UINT64DATA (session->
- connection_state.read_sequence_number), 8);
+ UINT64DATA (session->connection_state.
+ read_sequence_number), 8);
MHD_gnutls_hash (td, &type, 1);
if (ver >= MHD_GNUTLS_PROTOCOL_TLS1_0)
Modified: libmicrohttpd/src/daemon/https/tls/gnutls_constate.c
===================================================================
--- libmicrohttpd/src/daemon/https/tls/gnutls_constate.c 2008-11-17
07:48:51 UTC (rev 7930)
+++ libmicrohttpd/src/daemon/https/tls/gnutls_constate.c 2008-11-17
07:49:16 UTC (rev 7931)
@@ -105,9 +105,10 @@
{ /* TLS 1.0 */
ret =
MHD_gtls_PRF (session,
- (const unsigned char *) session->security_parameters.
- master_secret, TLS_MASTER_SIZE, keyexp, keyexp_length,
- rnd, 2 * TLS_RANDOM_SIZE, block_size, key_block);
+ (const unsigned char *) session->
+ security_parameters.master_secret, TLS_MASTER_SIZE,
+ keyexp, keyexp_length, rnd, 2 * TLS_RANDOM_SIZE,
+ block_size, key_block);
}
if (ret < 0)
@@ -506,35 +507,35 @@
{
rc = MHD_gtls_set_read_cipher (session,
MHD_gtls_cipher_suite_get_cipher_algo
- (&session->
-
security_parameters.current_cipher_suite));
+ (&session->security_parameters.
+ current_cipher_suite));
if (rc < 0)
return rc;
rc = MHD_gtls_set_read_mac (session,
MHD_gtls_cipher_suite_get_mac_algo
- (&session->
- security_parameters.current_cipher_suite));
+ (&session->security_parameters.
+ current_cipher_suite));
if (rc < 0)
return rc;
rc = MHD_gtls_set_kx (session,
MHD_gtls_cipher_suite_get_kx_algo
- (&session->
- security_parameters.current_cipher_suite));
+ (&session->security_parameters.
+ current_cipher_suite));
if (rc < 0)
return rc;
rc = MHD_gtls_set_read_compression (session,
- session->
- internals.compression_method);
+ session->internals.
+ compression_method);
if (rc < 0)
return rc;
}
else
{ /* RESUME_TRUE */
MHD__gnutls_cpy_read_security_parameters (&session->security_parameters,
- &session->
-
internals.resumed_security_parameters);
+ &session->internals.
+ resumed_security_parameters);
}
@@ -545,8 +546,8 @@
MHD__gnutls_handshake_log ("HSK[%x]: Cipher Suite: %s\n",
session,
MHD_gtls_cipher_suite_get_name
- (&session->
- security_parameters.current_cipher_suite));
+ (&session->security_parameters.
+ current_cipher_suite));
if (MHD_gtls_compression_is_ok
(session->security_parameters.read_compression_algorithm) != 0)
@@ -576,8 +577,8 @@
mac_size =
- MHD_gnutls_hash_get_algo_len (session->
- security_parameters.read_mac_algorithm);
+ MHD_gnutls_hash_get_algo_len (session->security_parameters.
+ read_mac_algorithm);
MHD__gnutls_handshake_log
("HSK[%x]: Initializing internal [read] cipher sessions\n", session);
@@ -588,8 +589,8 @@
/* initialize cipher session
*/
session->connection_state.read_cipher_state =
- MHD_gtls_cipher_init (session->
- security_parameters.read_bulk_cipher_algorithm,
+ MHD_gtls_cipher_init (session->security_parameters.
+ read_bulk_cipher_algorithm,
&session->cipher_specs.client_write_key,
&session->cipher_specs.client_write_IV);
if (session->connection_state.read_cipher_state == GNUTLS_CIPHER_FAILED
@@ -620,8 +621,8 @@
#if MHD_DEBUG_TLS
case GNUTLS_CLIENT:
session->connection_state.read_cipher_state =
- MHD_gtls_cipher_init (session->
- security_parameters.read_bulk_cipher_algorithm,
+ MHD_gtls_cipher_init (session->security_parameters.
+ read_bulk_cipher_algorithm,
&session->cipher_specs.server_write_key,
&session->cipher_specs.server_write_IV);
@@ -657,8 +658,8 @@
}
session->connection_state.read_compression_state =
- MHD_gtls_comp_init (session->
- security_parameters.read_compression_algorithm, 1);
+ MHD_gtls_comp_init (session->security_parameters.
+ read_compression_algorithm, 1);
if (session->connection_state.read_compression_state == GNUTLS_COMP_FAILED)
{
@@ -689,36 +690,35 @@
{
rc = MHD_gtls_set_write_cipher (session,
MHD_gtls_cipher_suite_get_cipher_algo
- (&session->
-
security_parameters.current_cipher_suite));
+ (&session->security_parameters.
+ current_cipher_suite));
if (rc < 0)
return rc;
rc = MHD_gtls_set_write_mac (session,
MHD_gtls_cipher_suite_get_mac_algo
- (&session->
- security_parameters.current_cipher_suite));
+ (&session->security_parameters.
+ current_cipher_suite));
if (rc < 0)
return rc;
rc = MHD_gtls_set_kx (session,
MHD_gtls_cipher_suite_get_kx_algo
- (&session->
- security_parameters.current_cipher_suite));
+ (&session->security_parameters.
+ current_cipher_suite));
if (rc < 0)
return rc;
rc = MHD_gtls_set_write_compression (session,
- session->
- internals.compression_method);
+ session->internals.
+ compression_method);
if (rc < 0)
return rc;
}
else
{ /* RESUME_TRUE */
- MHD__gnutls_cpy_write_security_parameters (&session->
- security_parameters,
- &session->
-
internals.resumed_security_parameters);
+ MHD__gnutls_cpy_write_security_parameters
+ (&session->security_parameters,
+ &session->internals.resumed_security_parameters);
}
rc = MHD__gnutls_set_write_keys (session);
@@ -727,8 +727,8 @@
MHD__gnutls_handshake_log ("HSK[%x]: Cipher Suite: %s\n", session,
MHD_gtls_cipher_suite_get_name
- (&session->
- security_parameters.current_cipher_suite));
+ (&session->security_parameters.
+ current_cipher_suite));
if (MHD_gtls_compression_is_ok
(session->security_parameters.write_compression_algorithm) != 0)
@@ -759,8 +759,8 @@
0);
mac_size =
- MHD_gnutls_hash_get_algo_len (session->
- security_parameters.write_mac_algorithm);
+ MHD_gnutls_hash_get_algo_len (session->security_parameters.
+ write_mac_algorithm);
MHD__gnutls_handshake_log
("HSK[%x]: Initializing internal [write] cipher sessions\n", session);
@@ -771,8 +771,8 @@
/* initialize cipher session
*/
session->connection_state.write_cipher_state =
- MHD_gtls_cipher_init (session->
- security_parameters.write_bulk_cipher_algorithm,
+ MHD_gtls_cipher_init (session->security_parameters.
+ write_bulk_cipher_algorithm,
&session->cipher_specs.server_write_key,
&session->cipher_specs.server_write_IV);
@@ -807,8 +807,8 @@
#if MHD_DEBUG_TLS
case GNUTLS_CLIENT:
session->connection_state.write_cipher_state =
- MHD_gtls_cipher_init (session->
- security_parameters.write_bulk_cipher_algorithm,
+ MHD_gtls_cipher_init (session->security_parameters.
+ write_bulk_cipher_algorithm,
&session->cipher_specs.client_write_key,
&session->cipher_specs.client_write_IV);
@@ -844,8 +844,8 @@
session->connection_state.write_compression_state =
- MHD_gtls_comp_init (session->
- security_parameters.write_compression_algorithm, 0);
+ MHD_gtls_comp_init (session->security_parameters.
+ write_compression_algorithm, 0);
if (session->connection_state.write_compression_state == GNUTLS_COMP_FAILED)
{
Modified: libmicrohttpd/src/daemon/https/tls/gnutls_errors.c
===================================================================
--- libmicrohttpd/src/daemon/https/tls/gnutls_errors.c 2008-11-17 07:48:51 UTC
(rev 7930)
+++ libmicrohttpd/src/daemon/https/tls/gnutls_errors.c 2008-11-17 07:49:16 UTC
(rev 7931)
@@ -398,6 +398,7 @@
log_func (level, str);
}
-void MHD__gnutls_null_log (void * n, ...)
+void
+MHD__gnutls_null_log (void *n, ...)
{
}
Modified: libmicrohttpd/src/daemon/https/tls/gnutls_extensions.c
===================================================================
--- libmicrohttpd/src/daemon/https/tls/gnutls_extensions.c 2008-11-17
07:48:51 UTC (rev 7930)
+++ libmicrohttpd/src/daemon/https/tls/gnutls_extensions.c 2008-11-17
07:49:16 UTC (rev 7931)
@@ -204,9 +204,8 @@
{
if (session->internals.extensions_sent_size < MAX_EXT_TYPES)
{
- session->internals.extensions_sent[session->
- internals.extensions_sent_size] =
- type;
+ session->internals.extensions_sent[session->internals.
+ extensions_sent_size] = type;
session->internals.extensions_sent_size++;
}
else
Modified: libmicrohttpd/src/daemon/https/tls/gnutls_handshake.c
===================================================================
--- libmicrohttpd/src/daemon/https/tls/gnutls_handshake.c 2008-11-17
07:48:51 UTC (rev 7930)
+++ libmicrohttpd/src/daemon/https/tls/gnutls_handshake.c 2008-11-17
07:49:16 UTC (rev 7931)
@@ -119,8 +119,8 @@
* hello message.
*/
memcpy (session->security_parameters.current_cipher_suite.suite,
- session->internals.resumed_security_parameters.current_cipher_suite.
- suite, 2);
+ session->internals.resumed_security_parameters.
+ current_cipher_suite.suite, 2);
session->internals.compression_method =
session->internals.resumed_security_parameters.read_compression_algorithm;
@@ -132,9 +132,8 @@
session->internals.resumed_security_parameters.entity;
MHD_gtls_set_current_version (session,
- session->
- internals.resumed_security_parameters.
- version);
+ session->internals.
+ resumed_security_parameters.version);
session->security_parameters.cert_type =
session->internals.resumed_security_parameters.cert_type;
@@ -217,13 +216,11 @@
MHD_gnutls_hash (td_sha, mesg, siz);
MHD_gnutls_mac_deinit_ssl3_handshake (td_md5, ret,
- session->
- security_parameters.master_secret,
- TLS_MASTER_SIZE);
+ session->security_parameters.
+ master_secret, TLS_MASTER_SIZE);
MHD_gnutls_mac_deinit_ssl3_handshake (td_sha, &ret[16],
- session->
- security_parameters.master_secret,
- TLS_MASTER_SIZE);
+ session->security_parameters.
+ master_secret, TLS_MASTER_SIZE);
return 0;
}
@@ -441,8 +438,8 @@
else
{
MHD_gtls_generate_session_id (session->security_parameters.session_id,
- &session->
- security_parameters.session_id_size);
+ &session->security_parameters.
+ session_id_size);
session->internals.resumed = RESUME_FALSE;
}
@@ -799,9 +796,9 @@
*/
if (MHD_gtls_get_kx_cred
(session,
- MHD_gtls_cipher_suite_get_kx_algo (&session->
-
security_parameters.current_cipher_suite),
- &err) == NULL && err != 0)
+ MHD_gtls_cipher_suite_get_kx_algo (&session->security_parameters.
+ current_cipher_suite), &err) == NULL
+ && err != 0)
{
MHD_gnutls_assert ();
return GNUTLS_E_INSUFFICIENT_CREDENTIALS;
@@ -814,8 +811,8 @@
*/
session->internals.auth_struct =
MHD_gtls_kx_auth_struct (MHD_gtls_cipher_suite_get_kx_algo
- (&session->
- security_parameters.current_cipher_suite));
+ (&session->security_parameters.
+ current_cipher_suite));
if (session->internals.auth_struct == NULL)
{
@@ -864,8 +861,8 @@
MHD__gnutls_handshake_log
("HSK[%x]: Selected Compression Method: %s\n", session,
- MHD_gtls_compression_get_name (session->
- internals.compression_method));
+ MHD_gtls_compression_get_name (session->internals.
+ compression_method));
return 0;
@@ -1029,8 +1026,8 @@
if (session->internals.handshake_header_buffer.header_size ==
handshake_header_size || (session->internals.v2_hello != 0
&& type == GNUTLS_HANDSHAKE_CLIENT_HELLO
- && session->internals.handshake_header_buffer.
- packet_length > 0))
+ && session->internals.
+ handshake_header_buffer.packet_length > 0))
{
*recv_type = session->internals.handshake_header_buffer.recv_type;
@@ -1073,13 +1070,11 @@
MHD_gtls_handshake_io_recv_int (session, GNUTLS_HANDSHAKE,
type,
&dataptr
- [session->
- internals.handshake_header_buffer.
- header_size],
+ [session->internals.
+ handshake_header_buffer.header_size],
HANDSHAKE_HEADER_SIZE -
- session->
- internals.handshake_header_buffer.
- header_size);
+ session->internals.
+ handshake_header_buffer.header_size);
if (ret <= 0)
{
MHD_gnutls_assert ();
@@ -1262,12 +1257,11 @@
ret = MHD__gnutls_handshake_hash_add_recvd (session, recv_type,
- session->
-
internals.handshake_header_buffer.
- header,
- session->
-
internals.handshake_header_buffer.
- header_size, dataptr, length32);
+ session->internals.
+ handshake_header_buffer.header,
+ session->internals.
+
handshake_header_buffer.header_size,
+ dataptr, length32);
if (ret < 0)
{
MHD_gnutls_assert ();
@@ -1361,8 +1355,8 @@
MHD__gnutls_handshake_log ("HSK[%x]: Selected cipher suite: %s\n", session,
MHD_gtls_cipher_suite_get_name
- (&session->
- security_parameters.current_cipher_suite));
+ (&session->security_parameters.
+ current_cipher_suite));
/* check if the credentials (username, public key etc.) are ok.
@@ -1385,8 +1379,8 @@
*/
session->internals.auth_struct =
MHD_gtls_kx_auth_struct (MHD_gtls_cipher_suite_get_kx_algo
- (&session->
- security_parameters.current_cipher_suite));
+ (&session->security_parameters.
+ current_cipher_suite));
if (session->internals.auth_struct == NULL)
{
@@ -1960,8 +1954,8 @@
pos += 2;
comp =
- (uint8_t) MHD_gtls_compression_get_num (session->internals.
- compression_method);
+ (uint8_t) MHD_gtls_compression_get_num (session->
+ internals.compression_method);
data[pos++] = comp;
@@ -2883,7 +2877,7 @@
SRP credential too. */
if (kx == MHD_GNUTLS_KX_SRP_RSA || kx == MHD_GNUTLS_KX_SRP_DSS)
{
- delete = 1;
+ delete = 1;
}
memcpy (&cs.suite, &(*cipherSuites)[i].suite, 2);
Modified: libmicrohttpd/src/daemon/https/tls/gnutls_kx.c
===================================================================
--- libmicrohttpd/src/daemon/https/tls/gnutls_kx.c 2008-11-17 07:48:51 UTC
(rev 7930)
+++ libmicrohttpd/src/daemon/https/tls/gnutls_kx.c 2008-11-17 07:49:16 UTC
(rev 7931)
@@ -65,13 +65,13 @@
MHD_gtls_bin2hex (PREMASTER.data, PREMASTER.size, buf,
sizeof (buf)));
MHD__gnutls_hard_log ("INT: CLIENT RANDOM[%d]: %s\n", 32,
- MHD_gtls_bin2hex (session->
- security_parameters.client_random,
- 32, buf, sizeof (buf)));
+ MHD_gtls_bin2hex (session->security_parameters.
+ client_random, 32, buf,
+ sizeof (buf)));
MHD__gnutls_hard_log ("INT: SERVER RANDOM[%d]: %s\n", 32,
- MHD_gtls_bin2hex (session->
- security_parameters.server_random,
- 32, buf, sizeof (buf)));
+ MHD_gtls_bin2hex (session->security_parameters.
+ server_random, 32, buf,
+ sizeof (buf)));
if (MHD__gnutls_protocol_get_version (session) == MHD_GNUTLS_PROTOCOL_SSL3)
{
@@ -86,8 +86,8 @@
MHD_gnutls_ssl3_generate_random (PREMASTER.data, PREMASTER.size,
rnd, 2 * TLS_RANDOM_SIZE,
TLS_MASTER_SIZE,
- session->
- security_parameters.master_secret);
+ session->security_parameters.
+ master_secret);
}
else if (session->security_parameters.extensions.oprfi_client_len > 0 &&
@@ -107,25 +107,21 @@
}
MHD__gnutls_hard_log ("INT: CLIENT OPRFI[%d]: %s\n",
- session->security_parameters.extensions.
- oprfi_server_len,
- MHD_gtls_bin2hex (session->
- security_parameters.extensions.
- oprfi_client,
- session->
- security_parameters.extensions.
- oprfi_client_len, buf,
- sizeof (buf)));
+ session->security_parameters.
+ extensions.oprfi_server_len,
+ MHD_gtls_bin2hex (session->security_parameters.
+ extensions.oprfi_client,
+ session->security_parameters.
+ extensions.oprfi_client_len,
+ buf, sizeof (buf)));
MHD__gnutls_hard_log ("INT: SERVER OPRFI[%d]: %s\n",
- session->security_parameters.extensions.
- oprfi_server_len,
- MHD_gtls_bin2hex (session->
- security_parameters.extensions.
- oprfi_server,
- session->
- security_parameters.extensions.
- oprfi_server_len, buf,
- sizeof (buf)));
+ session->security_parameters.
+ extensions.oprfi_server_len,
+ MHD_gtls_bin2hex (session->security_parameters.
+ extensions.oprfi_server,
+ session->security_parameters.
+ extensions.oprfi_server_len,
+ buf, sizeof (buf)));
memcpy (rnd, session->security_parameters.client_random,
TLS_RANDOM_SIZE);
@@ -175,9 +171,8 @@
return ret;
MHD__gnutls_hard_log ("INT: MASTER SECRET: %s\n",
- MHD_gtls_bin2hex (session->
- security_parameters.master_secret,
- TLS_MASTER_SIZE, buf,
+ MHD_gtls_bin2hex (session->security_parameters.
+ master_secret, TLS_MASTER_SIZE, buf,
sizeof (buf)));
return ret;
@@ -244,8 +239,8 @@
int data_size = 0;
int ret = 0;
- if (session->internals.
- auth_struct->MHD_gtls_gen_server_certificate_request == NULL)
+ if (session->internals.auth_struct->
+ MHD_gtls_gen_server_certificate_request == NULL)
return 0;
if (session->internals.send_cert_req <= 0)
@@ -257,8 +252,8 @@
if (again == 0)
{
data_size =
- session->internals.
- auth_struct->MHD_gtls_gen_server_certificate_request (session, &data);
+ session->internals.auth_struct->
+ MHD_gtls_gen_server_certificate_request (session, &data);
if (data_size < 0)
{
@@ -357,8 +352,8 @@
if (again == 0)
{
data_size =
- session->internals.
- auth_struct->MHD_gtls_gen_client_cert_vrfy (session, &data);
+ session->internals.auth_struct->
+ MHD_gtls_gen_client_cert_vrfy (session, &data);
if (data_size < 0)
{
MHD_gnutls_assert ();
@@ -430,8 +425,8 @@
int datasize;
int ret = 0;
- if (session->internals.
- auth_struct->MHD_gtls_process_server_certificate_request != NULL)
+ if (session->internals.auth_struct->
+ MHD_gtls_process_server_certificate_request != NULL)
{
ret =
@@ -446,10 +441,8 @@
return 0; /* ignored */
ret =
- session->internals.
- auth_struct->MHD_gtls_process_server_certificate_request (session,
- data,
- datasize);
+ session->internals.auth_struct->
+ MHD_gtls_process_server_certificate_request (session, data, datasize);
MHD_gnutls_free (data);
if (ret < 0)
return ret;
@@ -520,8 +513,8 @@
/* TLS 1.0 or SSL 3.0 with a valid certificate
*/
data_size =
- session->internals.
- auth_struct->MHD_gtls_gen_client_certificate (session, &data);
+ session->internals.auth_struct->
+ MHD_gtls_gen_client_certificate (session, &data);
if (data_size < 0)
{
@@ -581,8 +574,8 @@
if (again == 0)
{
data_size =
- session->internals.
- auth_struct->MHD_gtls_gen_server_certificate (session, &data);
+ session->internals.auth_struct->
+ MHD_gtls_gen_server_certificate (session, &data);
if (data_size < 0)
{
@@ -678,9 +671,8 @@
return 0;
}
ret =
- session->internals.
- auth_struct->MHD_gtls_process_client_certificate (session, data,
- datasize);
+ session->internals.auth_struct->
+ MHD_gtls_process_client_certificate (session, data, datasize);
MHD_gnutls_free (data);
if (ret < 0 && ret != GNUTLS_E_NO_CERTIFICATE_FOUND)
@@ -724,9 +716,8 @@
}
ret =
- session->internals.
- auth_struct->MHD_gtls_process_server_certificate (session, data,
- datasize);
+ session->internals.auth_struct->
+ MHD_gtls_process_server_certificate (session, data, datasize);
MHD_gnutls_free (data);
if (ret < 0)
{
@@ -777,9 +768,8 @@
}
ret =
- session->internals.
- auth_struct->MHD_gtls_process_client_cert_vrfy (session, data,
- datasize);
+ session->internals.auth_struct->
+ MHD_gtls_process_client_cert_vrfy (session, data, datasize);
MHD_gnutls_free (data);
if (ret < 0)
return ret;
Modified: libmicrohttpd/src/daemon/https/tls/gnutls_record.c
===================================================================
--- libmicrohttpd/src/daemon/https/tls/gnutls_record.c 2008-11-17 07:48:51 UTC
(rev 7930)
+++ libmicrohttpd/src/daemon/https/tls/gnutls_record.c 2008-11-17 07:49:16 UTC
(rev 7931)
@@ -294,8 +294,8 @@
MHD__gnutls_record_log
("REC[%x]: Sending Packet[%d] %s(%d) with length: %d\n", session,
- (int) MHD_gtls_uint64touint32 (&session->
- connection_state.write_sequence_number),
+ (int) MHD_gtls_uint64touint32 (&session->connection_state.
+ write_sequence_number),
MHD__gnutls_packet2str (type), type, sizeofdata);
if (sizeofdata > MAX_RECORD_SEND_SIZE)
@@ -860,13 +860,13 @@
MHD__gnutls_record_log
("REC[%x]: Expected Packet[%d] %s(%d) with length: %d\n", session,
- (int) MHD_gtls_uint64touint32 (&session->
- connection_state.read_sequence_number),
+ (int) MHD_gtls_uint64touint32 (&session->connection_state.
+ read_sequence_number),
MHD__gnutls_packet2str (type), type, sizeofdata);
MHD__gnutls_record_log
("REC[%x]: Received Packet[%d] %s(%d) with length: %d\n", session,
- (int) MHD_gtls_uint64touint32 (&session->
- connection_state.read_sequence_number),
+ (int) MHD_gtls_uint64touint32 (&session->connection_state.
+ read_sequence_number),
MHD__gnutls_packet2str (recv_type), recv_type, length);
if (length > MAX_RECV_SIZE)
@@ -942,8 +942,8 @@
MHD__gnutls_record_log
("REC[%x]: Decrypted Packet[%d] %s(%d) with length: %d\n", session,
- (int) MHD_gtls_uint64touint32 (&session->
- connection_state.read_sequence_number),
+ (int) MHD_gtls_uint64touint32 (&session->connection_state.
+ read_sequence_number),
MHD__gnutls_packet2str (recv_type), recv_type, decrypted_length);
/* increase sequence number
@@ -1089,4 +1089,3 @@
return MHD_gtls_recv_int (session, GNUTLS_APPLICATION_DATA, -1, data,
sizeofdata);
}
-
Modified: libmicrohttpd/src/daemon/https/tls/gnutls_sig.c
===================================================================
--- libmicrohttpd/src/daemon/https/tls/gnutls_sig.c 2008-11-17 07:48:51 UTC
(rev 7930)
+++ libmicrohttpd/src/daemon/https/tls/gnutls_sig.c 2008-11-17 07:49:16 UTC
(rev 7931)
@@ -75,9 +75,8 @@
}
MHD_gnutls_mac_deinit_ssl3_handshake (td_sha, &concat[16],
- session->
- security_parameters.master_secret,
- TLS_MASTER_SIZE);
+ session->security_parameters.
+ master_secret, TLS_MASTER_SIZE);
}
else
MHD_gnutls_hash_deinit (td_sha, &concat[16]);
@@ -95,9 +94,8 @@
if (ver == MHD_GNUTLS_PROTOCOL_SSL3)
MHD_gnutls_mac_deinit_ssl3_handshake (td_md5, concat,
- session->
-
security_parameters.master_secret,
- TLS_MASTER_SIZE);
+ session->security_parameters.
+ master_secret, TLS_MASTER_SIZE);
else
MHD_gnutls_hash_deinit (td_md5, concat);
@@ -267,8 +265,8 @@
return GNUTLS_E_INSUFFICIENT_CREDENTIALS;
return (*session->internals.sign_func) (session,
- session->
- internals.sign_func_userdata,
+ session->internals.
+ sign_func_userdata,
cert->cert_type, &cert->raw,
hash_concat, signature);
}
@@ -367,13 +365,11 @@
}
MHD_gnutls_mac_deinit_ssl3_handshake (td_md5, concat,
- session->
- security_parameters.master_secret,
- TLS_MASTER_SIZE);
+ session->security_parameters.
+ master_secret, TLS_MASTER_SIZE);
MHD_gnutls_mac_deinit_ssl3_handshake (td_sha, &concat[16],
- session->
- security_parameters.master_secret,
- TLS_MASTER_SIZE);
+ session->security_parameters.
+ master_secret, TLS_MASTER_SIZE);
}
else
{
Modified: libmicrohttpd/src/daemon/https/tls/gnutls_state.c
===================================================================
--- libmicrohttpd/src/daemon/https/tls/gnutls_state.c 2008-11-17 07:48:51 UTC
(rev 7930)
+++ libmicrohttpd/src/daemon/https/tls/gnutls_state.c 2008-11-17 07:49:16 UTC
(rev 7931)
@@ -806,8 +806,8 @@
enum MHD_GNUTLS_CipherAlgorithm cipher;
cipher =
- MHD_gtls_cipher_suite_get_cipher_algo (&session->
-
security_parameters.current_cipher_suite);
+ MHD_gtls_cipher_suite_get_cipher_algo (&session->security_parameters.
+ current_cipher_suite);
if (MHD_gtls_cipher_get_export_flag (cipher) != 0)
return 1;
@@ -837,4 +837,3 @@
{
return session->internals.direction;
}
-
Modified: libmicrohttpd/src/daemon/https/tls/gnutls_str.c
===================================================================
--- libmicrohttpd/src/daemon/https/tls/gnutls_str.c 2008-11-17 07:48:51 UTC
(rev 7930)
+++ libmicrohttpd/src/daemon/https/tls/gnutls_str.c 2008-11-17 07:49:16 UTC
(rev 7931)
@@ -155,4 +155,3 @@
return buffer;
}
-
Modified: libmicrohttpd/src/daemon/https/tls/gnutls_ui.c
===================================================================
--- libmicrohttpd/src/daemon/https/tls/gnutls_ui.c 2008-11-17 07:48:51 UTC
(rev 7930)
+++ libmicrohttpd/src/daemon/https/tls/gnutls_ui.c 2008-11-17 07:49:16 UTC
(rev 7931)
@@ -56,4 +56,3 @@
{
session->internals.dh_prime_bits = bits;
}
-
Modified: libmicrohttpd/src/daemon/https/tls/gnutls_x509.c
===================================================================
--- libmicrohttpd/src/daemon/https/tls/gnutls_x509.c 2008-11-17 07:48:51 UTC
(rev 7930)
+++ libmicrohttpd/src/daemon/https/tls/gnutls_x509.c 2008-11-17 07:49:16 UTC
(rev 7931)
@@ -113,8 +113,8 @@
1].params_size, &kid);
- MHD__gnutls_x509_write_rsa_params (res->cert_list[res->ncerts - 1][0].
- params,
+ MHD__gnutls_x509_write_rsa_params (res->
+ cert_list[res->ncerts - 1][0].params,
res->cert_list[res->ncerts -
1][0].params_size, &cid);
@@ -602,6 +602,3 @@
}
return 0;
}
-
-
-
Modified: libmicrohttpd/src/daemon/https/x509/common.c
===================================================================
--- libmicrohttpd/src/daemon/https/x509/common.c 2008-11-17 07:48:51 UTC
(rev 7930)
+++ libmicrohttpd/src/daemon/https/x509/common.c 2008-11-17 07:49:16 UTC
(rev 7931)
@@ -445,4 +445,3 @@
MHD_gnutls_free (str);
return algo;
}
-
Modified: libmicrohttpd/src/daemon/https/x509/extensions.c
===================================================================
--- libmicrohttpd/src/daemon/https/x509/extensions.c 2008-11-17 07:48:51 UTC
(rev 7930)
+++ libmicrohttpd/src/daemon/https/x509/extensions.c 2008-11-17 07:49:16 UTC
(rev 7931)
@@ -216,4 +216,3 @@
return 0;
}
-
Modified: libmicrohttpd/src/daemon/https/x509/mpi.c
===================================================================
--- libmicrohttpd/src/daemon/https/x509/mpi.c 2008-11-17 07:48:51 UTC (rev
7930)
+++ libmicrohttpd/src/daemon/https/x509/mpi.c 2008-11-17 07:49:16 UTC (rev
7931)
@@ -210,4 +210,3 @@
return result;
}
-
Modified: libmicrohttpd/src/daemon/https/x509/mpi.h
===================================================================
--- libmicrohttpd/src/daemon/https/x509/mpi.h 2008-11-17 07:48:51 UTC (rev
7930)
+++ libmicrohttpd/src/daemon/https/x509/mpi.h 2008-11-17 07:49:16 UTC (rev
7931)
@@ -35,4 +35,3 @@
mpi_t * ret_mpi);
int MHD__gnutls_x509_write_int (ASN1_TYPE node, const char *value, mpi_t mpi,
int lz);
-
Modified: libmicrohttpd/src/daemon/https/x509/x509.c
===================================================================
--- libmicrohttpd/src/daemon/https/x509/x509.c 2008-11-17 07:48:51 UTC (rev
7930)
+++ libmicrohttpd/src/daemon/https/x509/x509.c 2008-11-17 07:49:16 UTC (rev
7931)
@@ -362,4 +362,3 @@
return MHD__gnutls_x509_export_int (cert->cert, format, "CERTIFICATE",
output_data, output_data_size);
}
-
Modified: libmicrohttpd/src/daemon/https/x509/x509_privkey.c
===================================================================
--- libmicrohttpd/src/daemon/https/x509/x509_privkey.c 2008-11-17 07:48:51 UTC
(rev 7930)
+++ libmicrohttpd/src/daemon/https/x509/x509_privkey.c 2008-11-17 07:49:16 UTC
(rev 7931)
@@ -287,4 +287,3 @@
return 0;
}
-
Modified: libmicrohttpd/src/daemon/internal.h
===================================================================
--- libmicrohttpd/src/daemon/internal.h 2008-11-17 07:48:51 UTC (rev 7930)
+++ libmicrohttpd/src/daemon/internal.h 2008-11-17 07:49:16 UTC (rev 7931)
@@ -599,9 +599,9 @@
void *notify_completed_cls;
- void * (*uri_log_callback)(void * cls, const char * uri);
+ void *(*uri_log_callback) (void *cls, const char *uri);
- void * uri_log_callback_cls;
+ void *uri_log_callback_cls;
/**
* PID of the select thread (if we have internal select)
Modified: libmicrohttpd/src/examples/minimal_example_comet.c
===================================================================
--- libmicrohttpd/src/examples/minimal_example_comet.c 2008-11-17 07:48:51 UTC
(rev 7930)
+++ libmicrohttpd/src/examples/minimal_example_comet.c 2008-11-17 07:49:16 UTC
(rev 7931)
@@ -26,14 +26,11 @@
#include <microhttpd.h>
static int
-data_generator(void * cls,
- size_t pos,
- char * buf,
- int max)
+data_generator (void *cls, size_t pos, char *buf, int max)
{
if (max < 80)
return 0;
- memset(buf, 'A', max-1);
+ memset (buf, 'A', max - 1);
buf[79] = '\n';
return 80;
}
@@ -60,10 +57,8 @@
}
*ptr = NULL; /* reset when done */
response = MHD_create_response_from_callback (-1,
- 80,
- &data_generator,
- NULL,
- NULL);
+ 80,
+ &data_generator, NULL, NULL);
ret = MHD_queue_response (connection, MHD_HTTP_OK, response);
MHD_destroy_response (response);
return ret;
Modified: libmicrohttpd/src/include/microhttpd.h
===================================================================
--- libmicrohttpd/src/include/microhttpd.h 2008-11-17 07:48:51 UTC (rev
7930)
+++ libmicrohttpd/src/include/microhttpd.h 2008-11-17 07:49:16 UTC (rev
7931)
@@ -388,7 +388,7 @@
MHD_OPTION_HTTPS_MEM_CERT = 10,
/**
- * Daemon credentials type.
+ * Daemon credentials type.
* This option should be followed by one of the values listed in
* "enum MHD_GNUTLS_CredentialsType".
*/
Modified: libmicrohttpd/src/testcurl/https/mhds_session_info_test.c
===================================================================
--- libmicrohttpd/src/testcurl/https/mhds_session_info_test.c 2008-11-17
07:48:51 UTC (rev 7930)
+++ libmicrohttpd/src/testcurl/https/mhds_session_info_test.c 2008-11-17
07:49:16 UTC (rev 7931)
@@ -70,24 +70,28 @@
int ret;
/* assert actual connection cipher is the one negotiated */
- if (MHD_get_connection_info (connection, MHD_CONNECTION_INFO_CIPHER_ALGO)->
- cipher_algorithm != MHD_GNUTLS_CIPHER_AES_256_CBC)
+ if (MHD_get_connection_info
+ (connection,
+ MHD_CONNECTION_INFO_CIPHER_ALGO)->cipher_algorithm !=
+ MHD_GNUTLS_CIPHER_AES_256_CBC)
{
fprintf (stderr, "Error: requested cipher mismatch. %s\n",
strerror (errno));
return -1;
}
- if (MHD_get_connection_info (connection, MHD_CONNECTION_INFO_KX_ALGO)->
- kx_algorithm != MHD_GNUTLS_KX_RSA)
+ if (MHD_get_connection_info
+ (connection,
+ MHD_CONNECTION_INFO_KX_ALGO)->kx_algorithm != MHD_GNUTLS_KX_RSA)
{
fprintf (stderr, "Error: requested key exchange mismatch. %s\n",
strerror (errno));
return -1;
}
- if (MHD_get_connection_info (connection, MHD_CONNECTION_INFO_MAC_ALGO)->
- mac_algorithm != MHD_GNUTLS_MAC_SHA1)
+ if (MHD_get_connection_info
+ (connection,
+ MHD_CONNECTION_INFO_MAC_ALGO)->mac_algorithm != MHD_GNUTLS_MAC_SHA1)
{
fprintf (stderr, "Error: requested mac algorithm mismatch. %s\n",
strerror (errno));
@@ -104,16 +108,19 @@
return -1;
}
- if (MHD_get_connection_info (connection, MHD_CONNECTION_INFO_PROTOCOL)->
- protocol != MHD_GNUTLS_PROTOCOL_SSL3)
+ if (MHD_get_connection_info
+ (connection,
+ MHD_CONNECTION_INFO_PROTOCOL)->protocol != MHD_GNUTLS_PROTOCOL_SSL3)
{
fprintf (stderr, "Error: requested compression mismatch. %s\n",
strerror (errno));
return -1;
}
- if (MHD_get_connection_info (connection, MHD_CONNECTION_INFO_CERT_TYPE)->
- certificate_type != MHD_GNUTLS_CRT_X509)
+ if (MHD_get_connection_info
+ (connection,
+ MHD_CONNECTION_INFO_CERT_TYPE)->certificate_type !=
+ MHD_GNUTLS_CRT_X509)
{
fprintf (stderr, "Error: requested certificate mismatch. %s\n",
strerror (errno));
Modified: libmicrohttpd/src/testcurl/https/tls_alert_test.c
===================================================================
--- libmicrohttpd/src/testcurl/https/tls_alert_test.c 2008-11-17 07:48:51 UTC
(rev 7930)
+++ libmicrohttpd/src/testcurl/https/tls_alert_test.c 2008-11-17 07:49:16 UTC
(rev 7931)
@@ -71,7 +71,7 @@
strlen (srv_self_signed_cert_pem), &malloc);
MHD__gnutls_certificate_set_x509_key_mem (*xcred, cert, key,
- GNUTLS_X509_FMT_PEM);
+ GNUTLS_X509_FMT_PEM);
MHD__gnutls_init (session, GNUTLS_CLIENT);
ret = MHD__gnutls_priority_set_direct (*session, "NORMAL", err_pos);
@@ -167,7 +167,7 @@
inet_pton (AF_INET, "127.0.0.1", &sa.sin_addr);
MHD__gnutls_transport_set_ptr (session,
- (MHD_gnutls_transport_ptr_t) ((void *) sd));
+ (MHD_gnutls_transport_ptr_t) ((void *) sd));
ret = connect (sd, &sa, sizeof (struct sockaddr_in));
@@ -184,7 +184,7 @@
}
MHD__gnutls_alert_send (session, GNUTLS_AL_FATAL,
- GNUTLS_A_UNEXPECTED_MESSAGE);
+ GNUTLS_A_UNEXPECTED_MESSAGE);
usleep (100);
/* TODO better RST trigger */
Modified: libmicrohttpd/src/testcurl/https/tls_cipher_change_test.c
===================================================================
--- libmicrohttpd/src/testcurl/https/tls_cipher_change_test.c 2008-11-17
07:48:51 UTC (rev 7930)
+++ libmicrohttpd/src/testcurl/https/tls_cipher_change_test.c 2008-11-17
07:49:16 UTC (rev 7931)
@@ -73,7 +73,7 @@
strlen (srv_self_signed_cert_pem), &malloc);
MHD__gnutls_certificate_set_x509_key_mem (*xcred, cert, key,
- GNUTLS_X509_FMT_PEM);
+ GNUTLS_X509_FMT_PEM);
MHD__gnutls_init (session, GNUTLS_CLIENT);
ret = MHD__gnutls_priority_set_direct (*session, "NORMAL", err_pos);
@@ -89,8 +89,7 @@
static int
teardown (MHD_gtls_session_t session,
MHD_gnutls_datum_t * key,
- MHD_gnutls_datum_t * cert,
- MHD_gtls_cert_credentials_t xcred)
+ MHD_gnutls_datum_t * cert, MHD_gtls_cert_credentials_t xcred)
{
MHD_gtls_free_datum_m (key, free);
Modified: libmicrohttpd/src/testcurl/https/tls_daemon_options_test.c
===================================================================
--- libmicrohttpd/src/testcurl/https/tls_daemon_options_test.c 2008-11-17
07:48:51 UTC (rev 7930)
+++ libmicrohttpd/src/testcurl/https/tls_daemon_options_test.c 2008-11-17
07:49:16 UTC (rev 7931)
@@ -381,8 +381,8 @@
int cipher[] = { MHD_GNUTLS_CIPHER_3DES_CBC, 0 };
errorCount +=
- test_wrap ("https_transfer", &test_https_transfer,
- test_fd, "AES256-SHA",
+ test_wrap ("https_transfer", &test_https_transfer,
+ test_fd, "AES256-SHA",
CURL_SSLVERSION_TLSv1,
MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem,
MHD_OPTION_HTTPS_MEM_CERT, srv_self_signed_cert_pem,
@@ -391,11 +391,10 @@
errorCount +=
test_wrap ("protocol_version", &test_protocol_version, test_fd,
"AES256-SHA", CURL_SSLVERSION_TLSv1,
- MHD_OPTION_HTTPS_MEM_KEY,
+ MHD_OPTION_HTTPS_MEM_KEY,
srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT,
- srv_self_signed_cert_pem,
- MHD_OPTION_PROTOCOL_VERSION, p,
- MHD_OPTION_END);
+ srv_self_signed_cert_pem,
+ MHD_OPTION_PROTOCOL_VERSION, p, MHD_OPTION_END);
errorCount +=
test_wrap ("cipher DES-CBC3-SHA", &test_https_transfer, test_fd,
"DES-CBC3-SHA", CURL_SSLVERSION_TLSv1,
Modified: libmicrohttpd/src/testcurl/https/tls_session_time_out_test.c
===================================================================
--- libmicrohttpd/src/testcurl/https/tls_session_time_out_test.c
2008-11-17 07:48:51 UTC (rev 7930)
+++ libmicrohttpd/src/testcurl/https/tls_session_time_out_test.c
2008-11-17 07:49:16 UTC (rev 7931)
@@ -63,13 +63,13 @@
const char **err_pos;
MHD__gnutls_certificate_allocate_credentials (xcred);
-
+
MHD_gtls_set_datum_m (key, srv_key_pem, strlen (srv_key_pem), &malloc);
MHD_gtls_set_datum_m (cert, srv_self_signed_cert_pem,
strlen (srv_self_signed_cert_pem), &malloc);
MHD__gnutls_certificate_set_x509_key_mem (*xcred, cert, key,
- GNUTLS_X509_FMT_PEM);
+ GNUTLS_X509_FMT_PEM);
MHD__gnutls_init (session, GNUTLS_CLIENT);
ret = MHD__gnutls_priority_set_direct (*session, "NORMAL", err_pos);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r7931 - in libmicrohttpd/src: daemon daemon/https/lgl daemon/https/tls daemon/https/x509 examples include testcurl/https,
gnunet <=