summaryrefslogtreecommitdiffstats
path: root/ssl/s23_srvr.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2006-01-03 03:27:19 +0000
committerBodo Möller <bodo@openssl.org>2006-01-03 03:27:19 +0000
commitf1fd4544a3747682010ed89ac908713fe90b8304 (patch)
tree065bf82040e2d29ce319117bec6952e59ede2fcb /ssl/s23_srvr.c
parent349eb12fd5ac3ce216a6d89084b8c6a63b9388b7 (diff)
Various changes in the new TLS extension code, including the following:
- fix indentation - rename some functions and macros - fix up confusion between SSL_ERROR_... and SSL_AD_... values
Diffstat (limited to 'ssl/s23_srvr.c')
-rw-r--r--ssl/s23_srvr.c17
1 files changed, 11 insertions, 6 deletions
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);