X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=ssl%2Fs23_srvr.c;h=4da169eb31a97b7bf5348636e96becf5340f7b43;hb=f7a3296d8c8746b9901e95674425f300a6dfd1d4;hp=8bf044e15fd4f6c3e3cbb362d13d52c8715240aa;hpb=ed3883d21bb4ddfc21ec9d154e14e84c85db164d;p=oweals%2Fopenssl.git diff --git a/ssl/s23_srvr.c b/ssl/s23_srvr.c index 8bf044e15f..4da169eb31 100644 --- a/ssl/s23_srvr.c +++ b/ssl/s23_srvr.c @@ -56,7 +56,7 @@ * [including the GNU Public Licence.] */ /* ==================================================================== - * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved. + * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -140,7 +140,7 @@ IMPLEMENT_ssl23_meth_func(SSLv23_server_method, int ssl23_accept(SSL *s) { BUF_MEM *buf; - unsigned long Time=time(NULL); + unsigned long Time=(unsigned long)time(NULL); void (*cb)(const SSL *ssl,int type,int val)=NULL; int ret= -1; int new_state,state; @@ -416,7 +416,9 @@ 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) /* We can't have TLS extensions in SSL 2.0 format + * Client Hello, can we? Error condition should be + * '>' otherweise */ { SSLerr(SSL_F_SSL23_GET_CLIENT_HELLO,SSL_R_RECORD_LENGTH_MISMATCH); goto err; @@ -459,11 +461,14 @@ int ssl23_get_client_hello(SSL *s) *(d++)=1; *(d++)=0; +#if 0 /* copy any remaining data with may be extensions */ - p = p+csl+sil+cl ; - while (p < s->packet+s->packet_length) { + p = p+csl+sil+cl; + while (p < s->packet+s->packet_length) + { *(d++)=*(p++); - } + } +#endif i = (d-(unsigned char *)s->init_buf->data) - 4; l2n3((long)i, d_len);