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

emtpy fragments are not necessary for SSL_eNULL

(but noone uses it anyway)

fix t1_enc.c: use OPENSSL_NO_RC4, not NO_RC4
parent 2c8ad4f1
Loading
Loading
Loading
Loading
+8 −2
Original line number Original line Diff line number Diff line
@@ -385,11 +385,17 @@ int ssl3_setup_key_block(SSL *s)
		 */
		 */
		s->s3->need_empty_fragments = 1;
		s->s3->need_empty_fragments = 1;


		if (s->session->cipher != NULL)
			{
			if ((s->session->cipher->algorithms & SSL_ENC_MASK) == SSL_eNULL)
				s->s3->need_empty_fragments = 0;
			
#ifndef OPENSSL_NO_RC4
#ifndef OPENSSL_NO_RC4
		if ((s->session->cipher != NULL) && ((s->session->cipher->algorithms & SSL_ENC_MASK) == SSL_RC4))
			if ((s->session->cipher->algorithms & SSL_ENC_MASK) == SSL_RC4)
				s->s3->need_empty_fragments = 0;
				s->s3->need_empty_fragments = 0;
#endif
#endif
			}
			}
		}


	return ret;
	return ret;
		
		
+9 −3
Original line number Original line Diff line number Diff line
@@ -490,11 +490,17 @@ printf("\nkey block\n");
		 */
		 */
		s->s3->need_empty_fragments = 1;
		s->s3->need_empty_fragments = 1;


#ifndef NO_RC4
		if (s->session->cipher != NULL)
		if ((s->session->cipher != NULL) && ((s->session->cipher->algorithms & SSL_ENC_MASK) == SSL_RC4))
			{
			if ((s->session->cipher->algorithms & SSL_ENC_MASK) == SSL_eNULL)
				s->s3->need_empty_fragments = 0;
			
#ifndef OPENSSL_NO_RC4
			if ((s->session->cipher->algorithms & SSL_ENC_MASK) == SSL_RC4)
				s->s3->need_empty_fragments = 0;
				s->s3->need_empty_fragments = 0;
#endif
#endif
			}
			}
		}
		
		
	return(1);
	return(1);
err:
err: