Fix s_client early data indicator
authorMatt Caswell <matt@openssl.org>
Thu, 30 Mar 2017 15:06:29 +0000 (16:06 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 30 Mar 2017 15:16:38 +0000 (16:16 +0100)
commit12557a3445acc2f53321a3806f0478b998edb9a8
tree341d06cc5aa7e95968dc23c1cbbc20f4022a387e
parent9b5c865df0626d85065eacff714f20e2c721ca56
Fix s_client early data indicator

s_client was always saying that early_data was rejected even when it was
accepted. This was because it was using the wrong test to detect the end
of the handshake. It was using SSL_in_init() which only tells you whether
it is currently processing/sending/expecting handshake messages. It should
use SSL_is_init_finished() which tells you that no handshake messages are
being processed/sent/expected AND we have completed the handshake. In the
early data case we are not processing/sending handshake messages and we
are expecting early data (not a handshake message) - but the handshake has
not yet completed.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3090)
apps/s_client.c