diff options
author | Bodo Möller <bodo@openssl.org> | 2001-10-15 19:49:25 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2001-10-15 19:49:25 +0000 |
commit | 48948d53b6f61aa14bc5eab33f67f124c43175ff (patch) | |
tree | 9b766b938ef6e59fb5f37210b25fd78370fa5bb6 /ssl/s23_srvr.c | |
parent | dbec19622e2cc6ae50b303ece36d15810192d022 (diff) | |
download | openssl-new-48948d53b6f61aa14bc5eab33f67f124c43175ff.tar.gz |
Change ssl3_get_message and the functions using it so that complete
'Handshake' protocol structures are kept in memory, including
'msg_type' and 'length'.
(This is in preparation of future support for callbacks that get to
peek at handshake messages and the like.)
Diffstat (limited to 'ssl/s23_srvr.c')
-rw-r--r-- | ssl/s23_srvr.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ssl/s23_srvr.c b/ssl/s23_srvr.c index e0abbaf834..342d145c23 100644 --- a/ssl/s23_srvr.c +++ b/ssl/s23_srvr.c @@ -202,7 +202,7 @@ int ssl23_get_client_hello(SSL *s) * 9/10 client_version / */ char *buf= &(buf_space[0]); - unsigned char *p,*d,*dd; + unsigned char *p,*d,*d_len,*dd; unsigned int i; unsigned int csl,sil,cl; int n=0,j; @@ -365,6 +365,14 @@ int ssl23_get_client_hello(SSL *s) goto err; } + /* record header: version ... */ + *(d++) = SSL3_VERSION_MAJOR; /* == v[0] */ + *(d++) = v[1]; + /* ... and length (actual value will be written later) */ + d_len = d++; + d++; + + /* client_version */ *(d++) = SSL3_VERSION_MAJOR; /* == v[0] */ *(d++) = v[1]; @@ -396,6 +404,7 @@ int ssl23_get_client_hello(SSL *s) *(d++)=0; i=(d-(unsigned char *)s->init_buf->data); + s2n(i, d_len); /* get the data reused from the init_buf */ s->s3->tmp.reuse_message=1; |