diff options
author | Bodo Möller <bodo@openssl.org> | 2006-11-29 14:45:50 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2006-11-29 14:45:50 +0000 |
commit | 1e24b3a09e31b10649e5024b502ac3d7276923fe (patch) | |
tree | c89aeee02f9af875342c47ec72392d6154197f16 /ssl | |
parent | 73b979e601f09c8a235dd7dc92a841843af31459 (diff) |
fix support for receiving fragmented handshake messages
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/d1_pkt.c | 6 | ||||
-rw-r--r-- | ssl/s23_clnt.c | 1 | ||||
-rw-r--r-- | ssl/s23_srvr.c | 1 | ||||
-rw-r--r-- | ssl/s3_pkt.c | 6 | ||||
-rw-r--r-- | ssl/s3_srvr.c | 3 |
5 files changed, 4 insertions, 13 deletions
diff --git a/ssl/d1_pkt.c b/ssl/d1_pkt.c index 0b099325e1..8a047aeda7 100644 --- a/ssl/d1_pkt.c +++ b/ssl/d1_pkt.c @@ -573,11 +573,7 @@ again: n2s(p,rr->length); /* Lets check version */ - if (s->first_packet) - { - s->first_packet=0; - } - else + if (!s->first_packet) { if (version != s->version) { diff --git a/ssl/s23_clnt.c b/ssl/s23_clnt.c index 610169b3eb..1181d055bb 100644 --- a/ssl/s23_clnt.c +++ b/ssl/s23_clnt.c @@ -638,7 +638,6 @@ static int ssl23_get_server_hello(SSL *s) if (!ssl_get_new_session(s,0)) goto err; - s->first_packet=1; return(SSL_connect(s)); err: return(-1); diff --git a/ssl/s23_srvr.c b/ssl/s23_srvr.c index 4da169eb31..ddf5d4c3f5 100644 --- a/ssl/s23_srvr.c +++ b/ssl/s23_srvr.c @@ -576,7 +576,6 @@ int ssl23_get_client_hello(SSL *s) s->init_num=0; if (buf != buf_space) OPENSSL_free(buf); - s->first_packet=1; return(SSL_accept(s)); err: if (buf != buf_space) OPENSSL_free(buf); diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c index 1d34cec324..6754e993c5 100644 --- a/ssl/s3_pkt.c +++ b/ssl/s3_pkt.c @@ -307,11 +307,7 @@ fprintf(stderr, "Record type=%d, Length=%d\n", rr->type, rr->length); #endif /* Lets check version */ - if (s->first_packet) - { - s->first_packet=0; - } - else + if (!s->first_packet) { if (version != s->version) { diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c index a83f8ac763..f776dc0625 100644 --- a/ssl/s3_srvr.c +++ b/ssl/s3_srvr.c @@ -715,9 +715,9 @@ int ssl3_get_client_hello(SSL *s) */ if (s->state == SSL3_ST_SR_CLNT_HELLO_A) { - s->first_packet=1; s->state=SSL3_ST_SR_CLNT_HELLO_B; } + s->first_packet=1; n=s->method->ssl_get_message(s, SSL3_ST_SR_CLNT_HELLO_B, SSL3_ST_SR_CLNT_HELLO_C, @@ -726,6 +726,7 @@ int ssl3_get_client_hello(SSL *s) &ok); if (!ok) return((int)n); + s->first_packet=0; d=p=(unsigned char *)s->init_msg; /* use version from inside client hello, not from record header |