Changed TLS server to use OpenSSL SSL_accept() instead of SSL_read()
authorJouni Malinen <j@w1.fi>
Thu, 29 May 2008 17:36:18 +0000 (20:36 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 29 May 2008 17:36:18 +0000 (20:36 +0300)
commitbf206cada35873b2d3ac2dd8cdff3a575a3919fb
treef1b32198b29006ff4ed49493855f4204b49807b0
parent88160457438177d95579bf1fadb74a24b318a605
Changed TLS server to use OpenSSL SSL_accept() instead of SSL_read()

The server handshake processing was still using SSL_read() to get OpenSSL
to perform the handshake. While this works for most cases, it caused some
issues for re-authentication. This is now changed to use SSL_accept() which
is more approriate here since we know that the handshake is still going on
and there will not be any tunneled data available. This resolves some of
the re-authentication issues and makes it possible for the server to notice
if TLS processing fails (SSL_read() did not return an error in many of
these cases while SSL_accept() does).

Set session id context to a unique value in order to avoid fatal errors
when client tries session resumption (SSL_set_session_id_context() must be
called for that to work), but disable session resumption with the unique
value for the time being since not all server side code is ready for it yet
(e.g., EAP-TTLS needs special Phase 2 processing when using abbreviated
handshake).

Changed EAP-TLS server not to call TLS library when processing the final
ACK (empty data) from the client in order to avoid starting a new TLS
handshake with SSL_accept().
src/crypto/tls_openssl.c
src/eap_server/eap_tls.c