ssl3_get_client_hello: rearrange logic
authorEmilia Kasper <emilia@openssl.org>
Wed, 30 Sep 2015 13:33:12 +0000 (15:33 +0200)
committerEmilia Kasper <emilia@openssl.org>
Mon, 5 Oct 2015 17:03:52 +0000 (19:03 +0200)
commitb3e2272c59a5720467045e2ae62940fdb708ce76
tree9d61dfbedf4c9b1f7cf0e52fde863c07f8d9963c
parent2ff00bdbc4aad268e07df82541ff4a16b1f91fe8
ssl3_get_client_hello: rearrange logic

Move all packet parsing to the beginning of the method. This limits the
SSLv2 compatibility soup to the parsing, and makes the rest of the
processing uniform.

This is also needed for simpler EMS support: EMS servers need to do an
early scan for EMS to make resumption decisions. This'll be easier when
the entire ClientHello is parsed in the beginning.

As a side effect,
1) PACKETize ssl_get_prev_session and tls1_process_ticket; and
2) Delete dead code for SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG.

Reviewed-by: Matt Caswell <matt@openssl.org>
include/openssl/ssl.h
ssl/packet_locl.h
ssl/s3_srvr.c
ssl/ssl_locl.h
ssl/ssl_sess.c
ssl/t1_lib.c
test/packettest.c