X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=ssl%2Fstatem.c;h=f1df6a30daebe3273aab67d3113f32ed492fe15b;hp=2ebe2a644badec86b6b84d4ae1a40b22cb8ba9ef;hb=76af303761670cd54a93f1b196bcd7b2eaf7c29c;hpb=f6a2f2da58d6ba0042a9e94cf7281e5db23e9333 diff --git a/ssl/statem.c b/ssl/statem.c index 2ebe2a644b..f1df6a30da 100644 --- a/ssl/statem.c +++ b/ssl/statem.c @@ -464,7 +464,14 @@ static enum SUB_STATE_RETURN read_state_machine(SSL *s) { case READ_STATE_HEADER: s->init_num = 0; /* Get the state the peer wants to move to */ - ret = tls_get_message_header(s, &mt); + if (SSL_IS_DTLS(s)) { + /* + * In DTLS we get the whole message in one go - header and body + */ + ret = dtls_get_message(s, &mt, &len); + } else { + ret = tls_get_message_header(s, &mt); + } if (ret == 0) { /* Could be non-blocking IO */