openssl/ssl
Matt Caswell 77815a026c Fix resumption after HRR
Commit 6b1bb98fa moved the processing of ClientHello extensions into the
state machine post-processing stage. After processing s->init_num is reset
to 0, so by post-processing we cannot rely on its value. Unfortunately we
were using it to handle the PSK extension. This causes the handshake to
fail.

We were using init_num to figure out the length of ClientHello2 so we can
remove it from the handshake_buffer. The handshake_buffer holds the
transcript of all the messages sent so far. For PSK processing though we
only want to add in a partial ClientHello2. This commit changes things so
we just work out where ClientHello2 starts, working forward from the
beginning of handshake_buffer.

Fixes #2983

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2996)
2017-03-21 10:00:44 +00:00
..
record Update end of early data processing for draft-19 2017-03-16 14:20:38 +00:00
statem Fix resumption after HRR 2017-03-21 10:00:44 +00:00
bio_ssl.c Get pointer type right in BIO_ssl_shutdown() 2017-03-07 09:56:49 -05:00
build.info Move client parsing of ServerHello extensions into new framework 2016-12-08 17:18:25 +00:00
d1_lib.c Code health: Stop using timeb.h / ftime() (VMS only) 2017-02-28 15:32:01 +01:00
d1_msg.c Remove some obsolete/obscure internal define switches: 2017-03-01 10:44:49 +01:00
d1_srtp.c Move client parsing of ServerHello extensions into new framework 2016-12-08 17:18:25 +00:00
methods.c Add the SSL_METHOD for TLSv1.3 and all other base changes required 2016-11-02 13:08:21 +00:00
packet.c Use for loop in WPACKET_fill_lengths instead of do...while 2017-01-30 10:18:24 +00:00
packet_locl.h Miscellaneous style tweaks based on feedback received 2017-01-30 10:18:23 +00:00
pqueue.c Fix a missed size_t variable declaration 2016-11-04 12:09:46 +00:00
s3_cbc.c Clean up references to FIPS 2017-02-28 15:26:25 +01:00
s3_enc.c Use the new TLSv1.3 certificate_required alert where appropriate 2017-03-10 15:33:31 +00:00
s3_lib.c Remove some commented out code in libssl 2017-02-28 16:02:11 +00:00
s3_msg.c Provide functions to write early data 2017-03-02 17:44:14 +00:00
ssl_asn1.c Only accept early_data if the negotiated ALPN is the same 2017-03-02 17:44:15 +00:00
ssl_cert.c Remove obsolete version test when returning CA names. 2017-03-16 18:07:19 +00:00
ssl_ciph.c Remove some obsolete/obscure internal define switches: 2017-03-01 10:44:49 +01:00
ssl_conf.c Test mac-then-encrypt 2016-11-28 12:23:36 +01:00
ssl_err.c Implement certificate_authorities extension 2017-03-17 18:41:56 +00:00
ssl_init.c Indent ssl/ 2016-08-18 14:02:29 +02:00
ssl_lib.c Update end of early data processing for draft-19 2017-03-16 14:20:38 +00:00
ssl_locl.h Implement certificate_authorities extension 2017-03-17 18:41:56 +00:00
ssl_mcnf.c Fix misc size_t issues causing Windows warnings in 64 bit 2016-11-04 12:09:46 +00:00
ssl_rsa.c Use the callbacks from the SSL object instead of the SSL_CTX object 2017-03-10 22:31:50 +01:00
ssl_sess.c this change will prevent undefined behavior when src and dst are equal (memcpy), effectively allowing setting length only in both functions. 2017-03-08 09:42:29 -05:00
ssl_stat.c Add missing debug strings. 2016-09-07 16:08:38 -04:00
ssl_txt.c Move extension data into sub-structs 2017-01-09 22:26:47 -05:00
ssl_utst.c Remove heartbeat support 2016-11-13 16:24:02 -05:00
t1_enc.c Use the new TLSv1.3 certificate_required alert where appropriate 2017-03-10 15:33:31 +00:00
t1_ext.c Rework error handling of custom_ext_meth_add towards strong exception safety. 2017-02-15 08:37:52 -05:00
t1_lib.c Avoid questionable use of the value of a pointer 2017-03-10 15:56:58 -05:00
t1_trce.c Add TLSv1.3 draft-19 messages to trace 2017-03-16 13:16:51 -04:00
tls13_enc.c TLS1.3: Correct intermediate secret derivation 2017-03-19 20:59:59 +00:00
tls_srp.c Indent ssl/ 2016-08-18 14:02:29 +02:00