Remove obsolete defined(__INTEL__) condition.
[openssl.git] / ssl / record / rec_layer_s3.c
index fb396b9f723b37bd83383a020ceaa7512c6e2aa6..12df578be739276780ff9fc76eb6154f82ae58b2 100644 (file)
 #if     defined(OPENSSL_SMALL_FOOTPRINT) || \
         !(      defined(AES_ASM) &&     ( \
                 defined(__x86_64)       || defined(__x86_64__)  || \
-                defined(_M_AMD64)       || defined(_M_X64)      || \
-                defined(__INTEL__)      ) \
+                defined(_M_AMD64)       || defined(_M_X64)      )
         )
 # undef EVP_CIPH_FLAG_TLS1_1_MULTIBLOCK
 # define EVP_CIPH_FLAG_TLS1_1_MULTIBLOCK 0
@@ -136,7 +135,6 @@ void RECORD_LAYER_init(RECORD_LAYER *rl, SSL *s)
 {
     rl->s = s;
     SSL3_RECORD_clear(rl->rrec, SSL_MAX_PIPELINES);
-    SSL3_RECORD_clear(&rl->wrec, 1);
 }
 
 void RECORD_LAYER_clear(RECORD_LAYER *rl)
@@ -167,7 +165,6 @@ void RECORD_LAYER_clear(RECORD_LAYER *rl)
         SSL3_BUFFER_clear(&rl->wbuf[pipes]);
     rl->numwpipes = 0;
     SSL3_RECORD_clear(rl->rrec, SSL_MAX_PIPELINES);
-    SSL3_RECORD_clear(&rl->wrec, 1);
 
     RECORD_LAYER_reset_read_sequence(rl);
     RECORD_LAYER_reset_write_sequence(rl);
@@ -182,7 +179,6 @@ void RECORD_LAYER_release(RECORD_LAYER *rl)
         ssl3_release_read_buffer(rl->s);
     if (rl->numwpipes > 0)
         ssl3_release_write_buffer(rl->s);
-    /* TODO: Check why there is no release of wrec here?? */
     SSL3_RECORD_release(rl->rrec, SSL_MAX_PIPELINES);
 }
 
@@ -253,44 +249,30 @@ void SSL_set_default_read_buffer_len(SSL *s, size_t len)
 
 const char *SSL_rstate_string_long(const SSL *s)
 {
-    const char *str;
-
     switch (s->rlayer.rstate) {
     case SSL_ST_READ_HEADER:
-        str = "read header";
-        break;
+        return "read header";
     case SSL_ST_READ_BODY:
-        str = "read body";
-        break;
+        return "read body";
     case SSL_ST_READ_DONE:
-        str = "read done";
-        break;
+        return "read done";
     default:
-        str = "unknown";
-        break;
+        return "unknown";
     }
-    return (str);
 }
 
 const char *SSL_rstate_string(const SSL *s)
 {
-    const char *str;
-
     switch (s->rlayer.rstate) {
     case SSL_ST_READ_HEADER:
-        str = "RH";
-        break;
+        return "RH";
     case SSL_ST_READ_BODY:
-        str = "RB";
-        break;
+        return "RB";
     case SSL_ST_READ_DONE:
-        str = "RD";
-        break;
+        return "RD";
     default:
-        str = "unknown";
-        break;
+        return "unknown";
     }
-    return (str);
 }
 
 int ssl3_read_n(SSL *s, int n, int max, int extend, int clearold)
@@ -453,9 +435,9 @@ int ssl3_write_bytes(SSL *s, int type, const void *buf_, int len)
 {
     const unsigned char *buf = buf_;
     int tot;
-    unsigned int n, nw;
+    unsigned int n, split_send_fragment, maxpipes;
 #if !defined(OPENSSL_NO_MULTIBLOCK) && EVP_CIPH_FLAG_TLS1_1_MULTIBLOCK
-    unsigned int max_send_fragment, split_send_fragment, maxpipes;
+    unsigned int max_send_fragment, nw;
     unsigned int u_len = (unsigned int)len;
 #endif
     SSL3_BUFFER *wb = &s->rlayer.wbuf[0];
@@ -512,7 +494,7 @@ int ssl3_write_bytes(SSL *s, int type, const void *buf_, int len)
     /*
      * Depending on platform multi-block can deliver several *times*
      * better performance. Downside is that it has to allocate
-     * jumbo buffer to accomodate up to 8 records, but the
+     * jumbo buffer to accommodate up to 8 records, but the
      * compromise is considered worthy.
      */
     if (type == SSL3_RT_APPLICATION_DATA &&
@@ -648,7 +630,7 @@ int ssl3_write_bytes(SSL *s, int type, const void *buf_, int len)
     split_send_fragment = s->split_send_fragment;
     /*
      * If max_pipelines is 0 then this means "undefined" and we default to
-     * 1 pipeline. Similaraly if the cipher does not support pipelined
+     * 1 pipeline. Similarly if the cipher does not support pipelined
      * processing then we also only use 1 pipeline, or if we're not using
      * explicit IVs
      */
@@ -827,7 +809,7 @@ int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
         /*
          * extra fragment would be couple of cipher blocks, which would be
          * multiple of SSL3_ALIGN_PAYLOAD, so if we want to align the real
-         * payload, then we can just pretent we simply have two headers.
+         * payload, then we can just pretend we simply have two headers.
          */
         align = (size_t)SSL3_BUFFER_get_buf(wb) + 2 * SSL3_RT_HEADER_LENGTH;
         align = (0-align) & (SSL3_ALIGN_PAYLOAD - 1);
@@ -879,7 +861,7 @@ int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
 
         *(outbuf[j]++) = (s->version >> 8);
         /*
-         * Some servers hang if iniatial client hello is larger than 256 bytes
+         * Some servers hang if initial client hello is larger than 256 bytes
          * and record version number > TLS 1.0
          */
         if (SSL_get_state(s) == TLS_ST_CW_CLNT_HELLO
@@ -1462,7 +1444,7 @@ int ssl3_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf,
             /*
              * This is a warning but we receive it if we requested
              * renegotiation and the peer denied it. Terminate with a fatal
-             * alert because if application tried to renegotiatie it
+             * alert because if application tried to renegotiate it
              * presumably had a good reason and expects it to succeed. In
              * future we might have a renegotiation where we don't care if
              * the peer refused it where we carry on.