aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2008-08-24 22:07:29 +0000
committerChristian Grothoff <christian@grothoff.org>2008-08-24 22:07:29 +0000
commit1be634886d61c176df26b8e0784e2f751e563c56 (patch)
tree820c4b991dc63c1456c3d00e8032204a10fc5e98
parentfc198042d3bb1f824bb6979209ebd1699f447e4d (diff)
downloadlibmicrohttpd-1be634886d61c176df26b8e0784e2f751e563c56.tar.gz
libmicrohttpd-1be634886d61c176df26b8e0784e2f751e563c56.zip
cleanup
-rw-r--r--src/daemon/daemon.c7
-rw-r--r--src/daemon/https/tls/auth_cert.c3
-rw-r--r--src/daemon/https/tls/auth_rsa_export.c2
-rw-r--r--src/daemon/https/tls/gnutls_session.c129
-rw-r--r--src/testcurl/curl_version_check.c2
5 files changed, 3 insertions, 140 deletions
diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c
index 599f983a..473bef3a 100644
--- a/src/daemon/daemon.c
+++ b/src/daemon/daemon.c
@@ -330,7 +330,6 @@ MHD_TLS_init_connection (void *data)
330 330
331 /* initialize connection state */ 331 /* initialize connection state */
332 con->state = MHD_TLS_CONNECTION_INIT; 332 con->state = MHD_TLS_CONNECTION_INIT;
333
334 MHD_gnutls_init (&con->tls_session, GNUTLS_SERVER); 333 MHD_gnutls_init (&con->tls_session, GNUTLS_SERVER);
335 334
336 /* sets cipher priorities */ 335 /* sets cipher priorities */
@@ -588,10 +587,8 @@ MHD_cleanup_connections (struct MHD_Daemon *daemon)
588 MHD_destroy_response (pos->response); 587 MHD_destroy_response (pos->response);
589 MHD_pool_destroy (pos->pool); 588 MHD_pool_destroy (pos->pool);
590#if HTTPS_SUPPORT 589#if HTTPS_SUPPORT
591 if (pos->tls_session != 0) 590 if (pos->tls_session != NULL)
592 { 591 MHD_gnutls_deinit (pos->tls_session);
593 MHD_gnutls_deinit (pos->tls_session);
594 }
595#endif 592#endif
596 free (pos->addr); 593 free (pos->addr);
597 free (pos); 594 free (pos);
diff --git a/src/daemon/https/tls/auth_cert.c b/src/daemon/https/tls/auth_cert.c
index e007517c..ae6ef698 100644
--- a/src/daemon/https/tls/auth_cert.c
+++ b/src/daemon/https/tls/auth_cert.c
@@ -820,7 +820,6 @@ mhd_gtls_proc_cert_cert_req (mhd_gtls_session_t session, opaque * data,
820 int size, ret; 820 int size, ret;
821 opaque *p; 821 opaque *p;
822 mhd_gtls_cert_credentials_t cred; 822 mhd_gtls_cert_credentials_t cred;
823 cert_auth_info_t info;
824 ssize_t dsize; 823 ssize_t dsize;
825 int i, j; 824 int i, j;
826 enum MHD_GNUTLS_PublicKeyAlgorithm pk_algos[MAX_SIGN_ALGOS]; 825 enum MHD_GNUTLS_PublicKeyAlgorithm pk_algos[MAX_SIGN_ALGOS];
@@ -843,8 +842,6 @@ mhd_gtls_proc_cert_cert_req (mhd_gtls_session_t session, opaque * data,
843 return ret; 842 return ret;
844 } 843 }
845 844
846 info = mhd_gtls_get_auth_info (session);
847
848 p = data; 845 p = data;
849 dsize = data_size; 846 dsize = data_size;
850 847
diff --git a/src/daemon/https/tls/auth_rsa_export.c b/src/daemon/https/tls/auth_rsa_export.c
index bc8fecea..5442c8ba 100644
--- a/src/daemon/https/tls/auth_rsa_export.c
+++ b/src/daemon/https/tls/auth_rsa_export.c
@@ -77,7 +77,6 @@ gen_rsa_export_server_kx (mhd_gtls_session_t session, opaque ** data)
77 gnutls_privkey *apr_pkey; 77 gnutls_privkey *apr_pkey;
78 int apr_cert_list_length; 78 int apr_cert_list_length;
79 gnutls_datum_t signature, ddata; 79 gnutls_datum_t signature, ddata;
80 cert_auth_info_t info;
81 mhd_gtls_cert_credentials_t cred; 80 mhd_gtls_cert_credentials_t cred;
82 81
83 cred = (mhd_gtls_cert_credentials_t) 82 cred = (mhd_gtls_cert_credentials_t)
@@ -123,7 +122,6 @@ gen_rsa_export_server_kx (mhd_gtls_session_t session, opaque ** data)
123 return ret; 122 return ret;
124 } 123 }
125 124
126 info = mhd_gtls_get_auth_info (session);
127 mhd_gtls_rsa_export_set_pubkey (session, rsa_mpis[1], rsa_mpis[0]); 125 mhd_gtls_rsa_export_set_pubkey (session, rsa_mpis[1], rsa_mpis[0]);
128 126
129 mhd_gtls_mpi_print (NULL, &n_m, rsa_mpis[0]); 127 mhd_gtls_mpi_print (NULL, &n_m, rsa_mpis[0]);
diff --git a/src/daemon/https/tls/gnutls_session.c b/src/daemon/https/tls/gnutls_session.c
index fe14904c..95758817 100644
--- a/src/daemon/https/tls/gnutls_session.c
+++ b/src/daemon/https/tls/gnutls_session.c
@@ -30,94 +30,6 @@
30/* TODO this file should be removed if session resumption will be abandoned */ 30/* TODO this file should be removed if session resumption will be abandoned */
31 31
32/** 32/**
33 * gnutls_session_get_data - Returns all session parameters.
34 * @session: is a #mhd_gtls_session_t structure.
35 * @session_data: is a pointer to space to hold the session.
36 * @session_data_size: is the session_data's size, or it will be set by the function.
37 *
38 * Returns all session parameters, in order to support resuming.
39 * The client should call this, and keep the returned session, if he wants to
40 * resume that current version later by calling gnutls_session_set_data()
41 * This function must be called after a successful handshake.
42 *
43 * Resuming sessions is really useful and speedups connections after a succesful one.
44 **/
45//int
46//gnutls_session_get_data (mhd_gtls_session_t session,
47// void *session_data, size_t * session_data_size)
48//{
49//
50// gnutls_datum_t psession;
51// int ret;
52//
53// if (session->internals.resumable == RESUME_FALSE)
54// return GNUTLS_E_INVALID_SESSION;
55//
56// psession.data = session_data;
57//
58// ret = mhd_gtls_session_pack (session, &psession);
59// if (ret < 0)
60// {
61// gnutls_assert ();
62// return ret;
63// }
64// *session_data_size = psession.size;
65//
66// if (psession.size > *session_data_size)
67// {
68// ret = GNUTLS_E_SHORT_MEMORY_BUFFER;
69// goto error;
70// }
71//
72// if (session_data != NULL)
73// memcpy (session_data, psession.data, psession.size);
74//
75// ret = 0;
76//
77//error:
78// _gnutls_free_datum (&psession);
79// return ret;
80//}
81
82/**
83 * gnutls_session_get_data2 - Returns all session parameters.
84 * @session: is a #mhd_gtls_session_t structure.
85 * @session_data: is a pointer to a datum that will hold the session.
86 *
87 * Returns all session parameters, in order to support resuming.
88 * The client should call this, and keep the returned session, if he wants to
89 * resume that current version later by calling gnutls_session_set_data()
90 * This function must be called after a successful handshake. The returned
91 * datum must be freed with gnutls_free().
92 *
93 * Resuming sessions is really useful and speedups connections after a succesful one.
94 **/
95//int
96//gnutls_session_get_data2 (mhd_gtls_session_t session, gnutls_datum_t * data)
97//{
98//
99// int ret;
100//
101// if (data == NULL)
102// {
103// return GNUTLS_E_INVALID_REQUEST;
104// }
105//
106// if (session->internals.resumable == RESUME_FALSE)
107// return GNUTLS_E_INVALID_SESSION;
108//
109// ret = mhd_gtls_session_pack (session, data);
110// if (ret < 0)
111// {
112// gnutls_assert ();
113// return ret;
114// }
115//
116// return 0;
117//}
118
119
120/**
121 * MHD_gtls_session_get_id - Returns session id. 33 * MHD_gtls_session_get_id - Returns session id.
122 * @session: is a #mhd_gtls_session_t structure. 34 * @session: is a #mhd_gtls_session_t structure.
123 * @session_id: is a pointer to space to hold the session id. 35 * @session_id: is a pointer to space to hold the session id.
@@ -158,44 +70,3 @@ MHD_gtls_session_get_id (mhd_gtls_session_t session,
158 return 0; 70 return 0;
159} 71}
160 72
161/**
162 * gnutls_session_set_data - Sets all session parameters
163 * @session: is a #mhd_gtls_session_t structure.
164 * @session_data: is a pointer to space to hold the session.
165 * @session_data_size: is the session's size
166 *
167 * Sets all session parameters, in order to resume a previously established
168 * session. The session data given must be the one returned by gnutls_session_get_data().
169 * This function should be called before MHD_gnutls_handshake().
170 *
171 * Keep in mind that session resuming is advisory. The server may
172 * choose not to resume the session, thus a full handshake will be
173 * performed.
174 *
175 * Returns a negative value on error.
176 *
177 **/
178//int
179//gnutls_session_set_data (mhd_gtls_session_t session,
180// const void *session_data, size_t session_data_size)
181//{
182// int ret;
183// gnutls_datum_t psession;
184//
185// psession.data = (opaque *) session_data;
186// psession.size = session_data_size;
187//
188// if (session_data == NULL || session_data_size == 0)
189// {
190// gnutls_assert ();
191// return GNUTLS_E_INVALID_REQUEST;
192// }
193// ret = mhd_gtls_session_unpack (session, &psession);
194// if (ret < 0)
195// {
196// gnutls_assert ();
197// return ret;
198// }
199//
200// return 0;
201//}
diff --git a/src/testcurl/curl_version_check.c b/src/testcurl/curl_version_check.c
index 8847d035..09a93e1f 100644
--- a/src/testcurl/curl_version_check.c
+++ b/src/testcurl/curl_version_check.c
@@ -38,7 +38,7 @@ static int
38parse_version_number (const char **s) 38parse_version_number (const char **s)
39{ 39{
40 int i = 0; 40 int i = 0;
41 char num[16]; 41 char num[17];
42 42
43 while (i < 16 && ((**s >= '0') & (**s <= '9'))) 43 while (i < 16 && ((**s >= '0') & (**s <= '9')))
44 { 44 {