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

fix t1_enc.c: use OPENSSL_NO_RC4, not NO_RC4

ssl/s3_enc.c
ssl/t1_enc.c

index 72ac8b6913a0b22d4d9face3b5e43ea05bffe015..2bb5be49f184fc669fa44ad1cc7e7665b4ad77e4 100644 (file)
@@ -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;
index ecd2d6cbb557640bf8afb5c875e0d48e6314a809..1f6bb2edf39ae28caa16deba3883d820cf472435 100644 (file)
@@ -490,10 +490,16 @@ printf("\nkey block\n");
                 */
                s->s3->need_empty_fragments = 1;
 
-#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 != 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->algorithms & SSL_ENC_MASK) == SSL_RC4)
+                               s->s3->need_empty_fragments = 0;
 #endif
+                       }
                }
                
        return(1);