summaryrefslogtreecommitdiffstats
path: root/ssl/record/rec_layer_d1.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-09-07 16:36:53 +0100
committerMatt Caswell <matt@openssl.org>2015-10-30 08:32:44 +0000
commit8723588e1b9a13511ffd7b806c73293120bc1f44 (patch)
tree37743b5fa29f0c50f8eacfc328179207e999e87a /ssl/record/rec_layer_d1.c
parentb9908bf9b8d6d609736b537f4ecda720ff5dc078 (diff)
Implement Client TLS state machine
This swaps the implementation of the client TLS state machine to use the new state machine code instead. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'ssl/record/rec_layer_d1.c')
-rw-r--r--ssl/record/rec_layer_d1.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/ssl/record/rec_layer_d1.c b/ssl/record/rec_layer_d1.c
index d7d0093aec..d91de4d4a0 100644
--- a/ssl/record/rec_layer_d1.c
+++ b/ssl/record/rec_layer_d1.c
@@ -440,9 +440,8 @@ int dtls1_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf,
* SCTP.
*/
if ((!s->in_handshake && SSL_in_init(s)) ||
- (BIO_dgram_is_sctp(SSL_get_rbio(s)) &&
- (s->state == DTLS1_SCTP_ST_SR_READ_SOCK
- || s->state == DTLS1_SCTP_ST_CR_READ_SOCK)
+ (BIO_dgram_is_sctp(SSL_get_rbio(s))
+ && statem_in_sctp_read_sock(s)
&& s->s3->in_read_app_data != 2))
#else
if (!s->in_handshake && SSL_in_init(s))
@@ -586,8 +585,7 @@ int dtls1_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf,
*/
if (BIO_dgram_is_sctp(SSL_get_rbio(s)) &&
SSL3_RECORD_get_type(rr) == SSL3_RT_APPLICATION_DATA &&
- (s->state == DTLS1_SCTP_ST_SR_READ_SOCK
- || s->state == DTLS1_SCTP_ST_CR_READ_SOCK)) {
+ statem_in_sctp_read_sock(s)) {
s->rwstate = SSL_READING;
BIO_clear_retry_flags(SSL_get_rbio(s));
BIO_set_retry_read(SSL_get_rbio(s));