Commit 38b3e9ed authored by Bodo Möller's avatar Bodo Möller
Browse files

Fix SSL handshake functions and SSL_clear() such that SSL_clear()

never resets s->method to s->ctx->method when called from within one
of the SSL handshake functions.
parent 9ccadf1c
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -4,6 +4,11 @@

 Changes between 0.9.6b and 0.9.6c  [XX xxx XXXX]

  *) Fix SSL handshake functions and SSL_clear() such that SSL_clear()
     never resets s->method to s->ctx->method when called from within
     one of the SSL handshake functions.
     [Bodo Moeller; problem pointed out by Niko Baric]

  *) In ssl3_get_client_hello (ssl/s3_srvr.c), generate a fatal alert
     (sent using the client's version number) if client_version is
     smaller than the protocol version in use.  Also change
+1 −1
Original line number Diff line number Diff line
@@ -113,8 +113,8 @@ int ssl23_connect(SSL *s)
	else if (s->ctx->info_callback != NULL)
		cb=s->ctx->info_callback;
	
	if (!SSL_in_init(s) || SSL_in_before(s)) SSL_clear(s); 
	s->in_handshake++;
	if (!SSL_in_init(s) || SSL_in_before(s)) SSL_clear(s); 

	for (;;)
		{
+1 −1
Original line number Diff line number Diff line
@@ -165,8 +165,8 @@ int ssl23_accept(SSL *s)
	else if (s->ctx->info_callback != NULL)
		cb=s->ctx->info_callback;
	
	if (!SSL_in_init(s) || SSL_in_before(s)) SSL_clear(s); 
	s->in_handshake++;
	if (!SSL_in_init(s) || SSL_in_before(s)) SSL_clear(s); 

	for (;;)
		{
+1 −1
Original line number Diff line number Diff line
@@ -118,8 +118,8 @@ int ssl2_connect(SSL *s)
		cb=s->ctx->info_callback;

	/* init things to blank */
	if (!SSL_in_init(s) || SSL_in_before(s)) SSL_clear(s);
	s->in_handshake++;
	if (!SSL_in_init(s) || SSL_in_before(s)) SSL_clear(s);

	for (;;)
		{
+1 −1
Original line number Diff line number Diff line
@@ -119,8 +119,8 @@ int ssl2_accept(SSL *s)
		cb=s->ctx->info_callback;

	/* init things to blank */
	if (!SSL_in_init(s) || SSL_in_before(s)) SSL_clear(s);
	s->in_handshake++;
	if (!SSL_in_init(s) || SSL_in_before(s)) SSL_clear(s);

	if (s->cert == NULL)
		{
Loading