From: Bodo Möller Date: Tue, 9 Jul 2002 08:48:03 +0000 (+0000) Subject: emtpy fragments are not necessary for SSL_eNULL X-Git-Tag: OpenSSL_0_9_6e~34 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0ac51fcf0baaeea2bee1f6354c9f20de126701ca;p=oweals%2Fopenssl.git emtpy fragments are not necessary for SSL_eNULL (but noone uses it anyway) --- diff --git a/ssl/s3_enc.c b/ssl/s3_enc.c index 1944814ca7..79fa4f97c2 100644 --- a/ssl/s3_enc.c +++ b/ssl/s3_enc.c @@ -368,10 +368,16 @@ int ssl3_setup_key_block(SSL *s) */ 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 NO_RC4 - if ((s->session->cipher != NULL) && ((s->session->cipher->algorithms & SSL_ENC_MASK) == SSL_RC4)) - s->s3->need_empty_fragments = 0; + if ((s->session->cipher->algorithms & SSL_ENC_MASK) == SSL_RC4) + s->s3->need_empty_fragments = 0; #endif + } } return(1); diff --git a/ssl/t1_enc.c b/ssl/t1_enc.c index 000bfa7248..f3ecc5f586 100644 --- a/ssl/t1_enc.c +++ b/ssl/t1_enc.c @@ -440,10 +440,16 @@ printf("\nkey block\n"); */ 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 NO_RC4 - if ((s->session->cipher != NULL) && ((s->session->cipher->algorithms & SSL_ENC_MASK) == SSL_RC4)) - s->s3->need_empty_fragments = 0; + if ((s->session->cipher->algorithms & SSL_ENC_MASK) == SSL_RC4) + s->s3->need_empty_fragments = 0; #endif + } } return(1);