emtpy fragments are not necessary for SSL_eNULL
authorBodo Möller <bodo@openssl.org>
Tue, 9 Jul 2002 08:48:03 +0000 (08:48 +0000)
committerBodo Möller <bodo@openssl.org>
Tue, 9 Jul 2002 08:48:03 +0000 (08:48 +0000)
(but noone uses it anyway)

ssl/s3_enc.c
ssl/t1_enc.c

index 1944814ca70812b93645bd9a6c9582c67205f239..79fa4f97c24f5779640f016ed946f6d7e667dc98 100644 (file)
@@ -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);
index 000bfa72481dc748b17dce1eee9767b50ff6af20..f3ecc5f5869e6e937a2a5675402c5ff315bbeac8 100644 (file)
@@ -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);