Changes between Initial Version and Version 1 of Ticket #215, comment 6


Ignore:
Timestamp:
02/17/14 08:27:47 (11 years ago)
Author:
Aleksey Samsonov

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #215, comment 6

    initial v1  
    1 I think a bug in OpenSSL 1.0.0+ This patch solved a problem on my configuration:
    2 {{{
    3 From 4a56fe7c2bebc029cee4ad1445c440f66ed038bc Mon Sep 17 00:00:00 2001
    4 From: Aleksey Samsonov <s4ms0n0v@gmail.com>
    5 Date: Mon, 17 Feb 2014 06:08:26 +0400
    6 Subject: [PATCH] Don't release read buffer if read-ahead left
    7 
    8 Fix error: SSL_read() failed (SSL: error:1408F119:SSL
    9 routines:SSL3_GET_RECORD:decryption failed or bad record mac)
    10 
    11 More information to reproduce:
    12 http://trac.nginx.org/nginx/ticket/215
    13 http://mailman.nginx.org/pipermail/nginx-devel/2013-October/004385.html
    14 ---
    15  ssl/s3_pkt.c | 3 ++-
    16  1 file changed, 2 insertions(+), 1 deletion(-)
    17 
    18 diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c
    19 index b9e45c7..30b74c2 100644
    20 --- a/ssl/s3_pkt.c
    21 +++ b/ssl/s3_pkt.c
    22 @@ -1335,7 +1335,8 @@ start:
    23                                 s->rstate=SSL_ST_READ_HEADER;
    24                                 rr->off=0;
    25                                 if (s->mode & SSL_MODE_RELEASE_BUFFERS)
    26 -                                       ssl3_release_read_buffer(s);
    27 +                                       if (s->s3->rbuf.left == 0) /* no read-ahead left? */
    28 +                                               ssl3_release_read_buffer(s);
    29                                 }
    30                         }
    31                 return(n);
    32 --
    33 1.8.4
    34 
    35 
    36 }}}
     1I think a bug in OpenSSL 1.0.0+ This [http://rt.openssl.org/Ticket/Display.html?user=guest&pass=guest&id=3265 patch] solved a problem on my tests.