Don't check for padding bug if compression is negotiated.

PR: 1204
This commit is contained in:
Dr. Stephen Henson
2006-05-07 12:27:48 +00:00
parent 1b6b67b17e
commit b723a7b11b
2 changed files with 16 additions and 2 deletions

View File

@@ -628,7 +628,15 @@ int tls1_enc(SSL *s, int send)
{
ii=i=rec->data[l-1]; /* padding_length */
i++;
if (s->options&SSL_OP_TLS_BLOCK_PADDING_BUG)
/* NB: if compression is in operation the first packet
* may not be of even length so the padding bug check
* cannot be performed. This bug workaround has been
* around since SSLeay so hopefully it is either fixed
* now or no buggy implementation supports compression
* [steve]
*/
if ( (s->options&SSL_OP_TLS_BLOCK_PADDING_BUG)
&& !s->expand)
{
/* First packet is even in size, so check */
if ((memcmp(s->s3->read_sequence,