update
[openssl.git] / ssl / s3_enc.c
index 72ac8b6913a0b22d4d9face3b5e43ea05bffe015..888a9a28684fe0a45dd1b1827901b83888092b03 100644 (file)
  */
 
 #include <stdio.h>
-#include <openssl/evp.h>
 #include "ssl_locl.h"
+#include <openssl/evp.h>
 #include <openssl/md5.h>
 
 static unsigned char ssl3_pad_1[48]={
@@ -385,10 +385,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 OPENSSL_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 ret;