Go to file
David Benjamin 81ea0bf538 Delay creating s->session until resumption is resolved.
When not offering to resume a session, the client populates s->session with a
fresh SSL_SESSION before the ServerHello is processed and, in DTLS_ANY_VERSION,
before the version is even determined. Don't create a fresh SSL_SESSION until
we know we are doing a full handshake.

This brings ssl3_send_client_hello closer to ssl23_client_hello in behavior. It
also fixes ssl_version in the client in DTLS_ANY_VERSION.

SSLv23_client_method is largely unchanged. If no session is offered, s->session
continues to be NULL until the ServerHello is received. The one difference is
that s->session isn't populated until the entire ServerHello is received,
rather than just the first half, in the case of a fragmented ServerHello. Apart
from info_callback, no external hooks get called between those points, so this
shouldn't expose new missing NULL checks.

The other client methods change significantly to match SSLv23_client_method's
behavior. For TLS, any exposed missing NULL checks are also in
SSLv23_client_method (and version-specific methods are already weird), so that
should be safe. For DTLS, I've verified that accesses in d1_*.c either handle
NULL or are after the ServerHello.

Change-Id: Idcae6bd242480e28a57dbba76ce67f1ac1ae1d1d
Reviewed-on: https://boringssl-review.googlesource.com/2404
Reviewed-by: Adam Langley <agl@google.com>
2014-12-02 19:28:18 +00:00
crypto Fix bio_test.c build on Windows. 2014-12-01 19:06:59 +00:00
doc
include/openssl unifdef OPENSSL_NO_BIO. 2014-12-02 19:27:19 +00:00
ssl Delay creating s->session until resumption is resolved. 2014-12-02 19:28:18 +00:00
tool Get bssl tool building on Windows. 2014-10-31 22:02:01 +00:00
util Update constant-time operations. 2014-11-10 13:48:30 -08:00
.clang-format
.gitignore
BUILDING Build with yasm on Win64 as well. 2014-10-31 22:02:45 +00:00
CMakeLists.txt Make build work on OS X with older cmake versions. 2014-11-18 23:08:20 +00:00
codereview.settings Add a codereview.settings file. 2014-11-18 22:21:33 +00:00