Commit 9dc705a2 authored by Bodo Möller's avatar Bodo Möller
Browse files

fix support for receiving fragmented handshake messages

parent ea474c56
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -4,6 +4,13 @@

 Changes between 0.9.7l and 0.9.7m  [xx XXX xxxx]

  *) Have SSL/TLS server implementation tolerate "mismatched" record
     protocol version while receiving ClientHello even if the
     ClientHello is fragmented.  (The server can't insist on the
     particular protocol version it has chosen before the ServerHello
     message has informed the client about his choice.)
     [Bodo Moeller]

  *) Load error codes if they are not already present instead of using a
     static variable. This allows them to be cleanly unloaded and reloaded.
     [Steve Henson]
+0 −1
Original line number Diff line number Diff line
@@ -608,7 +608,6 @@ static int ssl23_get_server_hello(SSL *s)
	if (!ssl_get_new_session(s,0))
		goto err;

	s->first_packet=1;
	return(SSL_connect(s));
err:
	return(-1);
+0 −1
Original line number Diff line number Diff line
@@ -592,7 +592,6 @@ int ssl23_get_client_hello(SSL *s)
	s->init_num=0;

	if (buf != buf_space) OPENSSL_free(buf);
	s->first_packet=1;
	return(SSL_accept(s));
err:
	if (buf != buf_space) OPENSSL_free(buf);
+1 −5
Original line number Diff line number Diff line
@@ -275,11 +275,7 @@ again:
		n2s(p,rr->length);

		/* Lets check version */
		if (s->first_packet)
			{
			s->first_packet=0;
			}
		else
		if (!s->first_packet)
			{
			if (version != s->version)
				{
+2 −1
Original line number Diff line number Diff line
@@ -662,9 +662,9 @@ static int ssl3_get_client_hello(SSL *s)
	 */
	if (s->state == SSL3_ST_SR_CLNT_HELLO_A)
		{
		s->first_packet=1;
		s->state=SSL3_ST_SR_CLNT_HELLO_B;
		}
	s->first_packet=1;
	n=ssl3_get_message(s,
		SSL3_ST_SR_CLNT_HELLO_B,
		SSL3_ST_SR_CLNT_HELLO_C,
@@ -673,6 +673,7 @@ static int ssl3_get_client_hello(SSL *s)
		&ok);

	if (!ok) return((int)n);
	s->first_packet=0;
	d=p=(unsigned char *)s->init_msg;

	/* use version from inside client hello, not from record header