Fix SSL_set_session_ticket_ext when used with SSLv23_method
authorMatt Caswell <matt@openssl.org>
Mon, 27 Jul 2015 12:30:43 +0000 (13:30 +0100)
committerMatt Caswell <matt@openssl.org>
Mon, 27 Jul 2015 15:47:00 +0000 (16:47 +0100)
commit728432aed0f8e0c8b86df0724c9fde76659bc54b
treeeda8a45f36a8f865bfb78dec5fbc6447fe5200d0
parent8e75dcf58705dbf29f37bfa9725ef6cde49c0c8a
Fix SSL_set_session_ticket_ext when used with SSLv23_method

The function SSL_set_session_ticket_ext can be used to set custom session
ticket data passed in the initial ClientHello. This can be particularly
useful for EAP-FAST. However, when using SSLv23_method, the session does
not get created until the ServerHello has been received. The extension code
will only add the SessionTicket data to the ClientHello if a session already
exists. Therefore SSL_set_session_ticket_ext has no impact when used in
conjunction with SSLv23_method. The solution is to simply create the session
during creation of the ClientHello instead of waiting for the ServerHello.

This commit fixes the test failure introduced by the previous commit.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
ssl/s23_clnt.c