Move in_handshake into STATEM

The SSL variable |in_handshake| seems misplaced. It would be better to have
it in the STATEM structure.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
Matt Caswell
2015-10-22 13:57:18 +01:00
parent 20dbe58577
commit 024f543c15
11 changed files with 43 additions and 26 deletions

View File

@@ -125,11 +125,11 @@ int dtls1_write_app_data_bytes(SSL *s, int type, const void *buf_, int len)
* Check if we have to continue an interrupted handshake for reading
* belated app data with SCTP.
*/
if ((SSL_in_init(s) && !s->in_handshake) ||
if ((SSL_in_init(s) && !ossl_statem_get_in_handshake(s)) ||
(BIO_dgram_is_sctp(SSL_get_wbio(s)) &&
ossl_statem_in_sctp_read_sock(s)))
#else
if (SSL_in_init(s) && !s->in_handshake)
if (SSL_in_init(s) && !ossl_statem_get_in_handshake(s))
#endif
{
i = s->handshake_func(s);