From a10b85d9e65d1c0bdc1370b5a86bc637928a7cda Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bodo=20M=C3=B6ller?= Date: Sat, 10 Nov 2001 10:43:51 +0000 Subject: [PATCH] make code a little more similar to what it looked like before the fixes --- CHANGES | 2 +- ssl/s2_clnt.c | 8 ++++---- ssl/s2_srvr.c | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CHANGES b/CHANGES index 342bf7ad89..ac34759770 100644 --- a/CHANGES +++ b/CHANGES @@ -26,7 +26,7 @@ *) Change ssl/s2_clnt.c and ssl/s3_srvr.c so that received handshake messages are stored in a single piece (fixed-length part and - variable-length part) and fix various bugs found on the way. + variable-length part combined) and fix various bugs found on the way. [Bodo Moeller] *) In ssl3_get_client_hello (ssl/s3_srvr.c), generate a fatal alert diff --git a/ssl/s2_clnt.c b/ssl/s2_clnt.c index a2bbde4770..615e425736 100644 --- a/ssl/s2_clnt.c +++ b/ssl/s2_clnt.c @@ -852,8 +852,8 @@ static int get_server_verify(SSL *s) p=(unsigned char *)s->init_buf->data; if (s->state == SSL2_ST_GET_SERVER_VERIFY_A) { - i=ssl2_read(s,(char *)&(p[s->init_num]),3-s->init_num); - if (i < (3-s->init_num)) + i=ssl2_read(s,(char *)&(p[s->init_num]),1-s->init_num); + if (i < (1-s->init_num)) return(ssl2_part_read(s,SSL_F_GET_SERVER_VERIFY,i)); s->init_num += i; @@ -900,8 +900,8 @@ static int get_server_finished(SSL *s) p=buf; if (s->state == SSL2_ST_GET_SERVER_FINISHED_A) { - i=ssl2_read(s,(char *)&(buf[s->init_num]),3-s->init_num); - if (i < (3-s->init_num)) + i=ssl2_read(s,(char *)&(buf[s->init_num]),1-s->init_num); + if (i < (1-s->init_num)) return(ssl2_part_read(s,SSL_F_GET_SERVER_FINISHED,i)); s->init_num += i; diff --git a/ssl/s2_srvr.c b/ssl/s2_srvr.c index 8eeab6b50b..4f1686a00c 100644 --- a/ssl/s2_srvr.c +++ b/ssl/s2_srvr.c @@ -780,10 +780,10 @@ static int get_client_finished(SSL *s) p=(unsigned char *)s->init_buf->data; if (s->state == SSL2_ST_GET_CLIENT_FINISHED_A) { - i=ssl2_read(s,(char *)&(p[s->init_num]),3-s->init_num); - if (i < 3-s->init_num) + i=ssl2_read(s,(char *)&(p[s->init_num]),1-s->init_num); + if (i < 1-s->init_num) return(ssl2_part_read(s,SSL_F_GET_CLIENT_FINISHED,i)); - s->init_num = 3; + s->init_num += i; if (*p != SSL2_MT_CLIENT_FINISHED) { -- 2.25.1