diff options
author | Bodo Möller <bodo@openssl.org> | 2006-01-03 00:14:37 +0100 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2006-01-03 00:14:37 +0100 |
commit | ed3883d21bb4ddfc21ec9d154e14e84c85db164d (patch) | |
tree | 90b41ebd80a9ddc73886c2f9d3ff427d48508f21 /ssl/s23_srvr.c | |
parent | Refine login in b_sock.c. (diff) | |
download | openssl-ed3883d21bb4ddfc21ec9d154e14e84c85db164d.tar.xz openssl-ed3883d21bb4ddfc21ec9d154e14e84c85db164d.zip |
Support TLS extensions (specifically, HostName)
Submitted by: Peter Sylvester
Diffstat (limited to 'ssl/s23_srvr.c')
-rw-r--r-- | ssl/s23_srvr.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ssl/s23_srvr.c b/ssl/s23_srvr.c index b33b699a1c..8bf044e15f 100644 --- a/ssl/s23_srvr.c +++ b/ssl/s23_srvr.c @@ -140,7 +140,7 @@ IMPLEMENT_ssl23_meth_func(SSLv23_server_method, int ssl23_accept(SSL *s) { BUF_MEM *buf; - unsigned long Time=(unsigned long)time(NULL); + unsigned long Time=time(NULL); void (*cb)(const SSL *ssl,int type,int val)=NULL; int ret= -1; int new_state,state; @@ -416,7 +416,7 @@ int ssl23_get_client_hello(SSL *s) n2s(p,sil); n2s(p,cl); d=(unsigned char *)s->init_buf->data; - if ((csl+sil+cl+11) != s->packet_length) + if ((csl+sil+cl+11) > s->packet_length) { SSLerr(SSL_F_SSL23_GET_CLIENT_HELLO,SSL_R_RECORD_LENGTH_MISMATCH); goto err; @@ -459,6 +459,12 @@ int ssl23_get_client_hello(SSL *s) *(d++)=1; *(d++)=0; + /* copy any remaining data with may be extensions */ + p = p+csl+sil+cl ; + while (p < s->packet+s->packet_length) { + *(d++)=*(p++); + } + i = (d-(unsigned char *)s->init_buf->data) - 4; l2n3((long)i, d_len); |