X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=ssl%2Frecord%2Frec_layer_s3.c;h=12df578be739276780ff9fc76eb6154f82ae58b2;hp=6d2f250b7b07979ac4395cde46990bb8896333ab;hb=b1a07c38540105077878ad80a6a87c96fdbc18f1;hpb=fa22f98f19d2bf6c898d6939103d686ae3b34ba6 diff --git a/ssl/record/rec_layer_s3.c b/ssl/record/rec_layer_s3.c index 6d2f250b7b..12df578be7 100644 --- a/ssl/record/rec_layer_s3.c +++ b/ssl/record/rec_layer_s3.c @@ -125,8 +125,7 @@ #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 @@ -250,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) @@ -509,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 && @@ -645,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 */ @@ -824,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); @@ -876,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 @@ -1459,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.