aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/https/tls/auth_dh_common.c
diff options
context:
space:
mode:
authorlv-426 <oxcafebaby@yahoo.com>2008-07-07 02:38:41 +0000
committerlv-426 <oxcafebaby@yahoo.com>2008-07-07 02:38:41 +0000
commitb9f09651e6217396171d0ee25eb3f1a5087a3ad6 (patch)
tree34e6ee9fe24d7a2d3c68e5931a15626c72d150b4 /src/daemon/https/tls/auth_dh_common.c
parenteb391a612d2c1a3bea1cbfecfa008079c8a6320c (diff)
downloadlibmicrohttpd-b9f09651e6217396171d0ee25eb3f1a5087a3ad6.tar.gz
libmicrohttpd-b9f09651e6217396171d0ee25eb3f1a5087a3ad6.zip
migrated code to connection_https
fixed gcrypt lib initialization to support mt removed some gnutls psk code added CIPHER_ALGORITHM & KX_PRIORITY options added certificate loading test added TLS GET test
Diffstat (limited to 'src/daemon/https/tls/auth_dh_common.c')
-rw-r--r--src/daemon/https/tls/auth_dh_common.c48
1 files changed, 3 insertions, 45 deletions
diff --git a/src/daemon/https/tls/auth_dh_common.c b/src/daemon/https/tls/auth_dh_common.c
index f1b82bf9..f6354cb6 100644
--- a/src/daemon/https/tls/auth_dh_common.c
+++ b/src/daemon/https/tls/auth_dh_common.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25/* This file contains common stuff in Ephemeral Diffie Hellman (DHE) and 25/* This file contains common stuff in Ephemeral Diffie Hellman (DHE) and
26 * Anonymous DH key exchange(DHA). These are used in the handshake procedure 26 * Anonymous DH key exchange(DHA). These are used in the handshake procedure
27 * of the certificate and anoymous authentication. 27 * of the certificate and anoymous authentication.
28 */ 28 */
29 29
@@ -86,29 +86,7 @@ _gnutls_proc_dh_common_client_kx (gnutls_session_t session,
86 _gnutls_mpi_release (&session->key->client_Y); 86 _gnutls_mpi_release (&session->key->client_Y);
87 _gnutls_mpi_release (&session->key->dh_secret); 87 _gnutls_mpi_release (&session->key->dh_secret);
88 88
89 89 ret = _gnutls_mpi_dprint (&session->key->key, session->key->KEY);
90 if (_gnutls_cipher_suite_get_kx_algo
91 (&session->security_parameters.current_cipher_suite)
92 != GNUTLS_KX_DHE_PSK)
93 {
94 ret = _gnutls_mpi_dprint (&session->key->key, session->key->KEY);
95 }
96 /* In DHE_PSK the key is set differently
97 else
98 {
99 gnutls_datum_t tmp_dh_key;
100 ret = _gnutls_mpi_dprint (&tmp_dh_key, session->key->KEY);
101 if (ret < 0)
102 {
103 gnutls_assert ();
104 return ret;
105 }
106
107 ret = _gnutls_set_psk_session_key (session, &tmp_dh_key);
108 _gnutls_free_datum (&tmp_dh_key);
109
110 }
111 */
112 90
113 _gnutls_mpi_release (&session->key->KEY); 91 _gnutls_mpi_release (&session->key->KEY);
114 92
@@ -170,27 +148,7 @@ _gnutls_gen_dh_common_client_kx (gnutls_session_t session, opaque ** data)
170 _gnutls_mpi_release (&session->key->client_p); 148 _gnutls_mpi_release (&session->key->client_p);
171 _gnutls_mpi_release (&session->key->client_g); 149 _gnutls_mpi_release (&session->key->client_g);
172 150
173 if (_gnutls_cipher_suite_get_kx_algo 151 ret = _gnutls_mpi_dprint (&session->key->key, session->key->KEY);
174 (&session->security_parameters.current_cipher_suite)
175 != GNUTLS_KX_DHE_PSK)
176 {
177 ret = _gnutls_mpi_dprint (&session->key->key, session->key->KEY);
178 }
179 /* In DHE_PSK the key is set differently
180 else
181 {
182 gnutls_datum_t tmp_dh_key;
183 ret = _gnutls_mpi_dprint (&tmp_dh_key, session->key->KEY);
184 if (ret < 0)
185 {
186 gnutls_assert ();
187 goto error;
188 }
189
190 ret = _gnutls_set_psk_session_key (session, &tmp_dh_key);
191 _gnutls_free_datum (&tmp_dh_key);
192
193 }*/
194 152
195 _gnutls_mpi_release (&session->key->KEY); 153 _gnutls_mpi_release (&session->key->KEY);
196 154