aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/https/tls/gnutls_session.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon/https/tls/gnutls_session.c')
-rw-r--r--src/daemon/https/tls/gnutls_session.c129
1 files changed, 0 insertions, 129 deletions
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//}