summaryrefslogtreecommitdiffstats
path: root/net/third_party/nss/ssl/ssl3con.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/third_party/nss/ssl/ssl3con.c')
-rw-r--r--net/third_party/nss/ssl/ssl3con.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/net/third_party/nss/ssl/ssl3con.c b/net/third_party/nss/ssl/ssl3con.c
index a946d68..0018859 100644
--- a/net/third_party/nss/ssl/ssl3con.c
+++ b/net/third_party/nss/ssl/ssl3con.c
@@ -39,7 +39,7 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-/* $Id: ssl3con.c,v 1.125 2009/11/26 01:51:10 wtc%google.com Exp $ */
+/* $Id: ssl3con.c,v 1.126 2009/12/01 17:59:46 wtc%google.com Exp $ */
#include "cert.h"
#include "ssl.h"
@@ -1296,7 +1296,7 @@ ssl3_MapZlibError(int zlib_error)
static SECStatus
ssl3_DeflateInit(void *void_context)
{
- z_stream* context = void_context;
+ z_stream *context = void_context;
context->zalloc = NULL;
context->zfree = NULL;
context->opaque = NULL;
@@ -1307,7 +1307,7 @@ ssl3_DeflateInit(void *void_context)
static SECStatus
ssl3_InflateInit(void *void_context)
{
- z_stream* context = void_context;
+ z_stream *context = void_context;
context->zalloc = NULL;
context->zfree = NULL;
context->opaque = NULL;
@@ -1321,7 +1321,13 @@ static SECStatus
ssl3_DeflateCompress(void *void_context, unsigned char *out, int *out_len,
int maxout, const unsigned char *in, int inlen)
{
- z_stream* context = void_context;
+ z_stream *context = void_context;
+
+ if (!inlen) {
+ *out_len = 0;
+ return SECSuccess;
+ }
+
context->next_in = (unsigned char*) in;
context->avail_in = inlen;
context->next_out = out;
@@ -1344,7 +1350,13 @@ static SECStatus
ssl3_DeflateDecompress(void *void_context, unsigned char *out, int *out_len,
int maxout, const unsigned char *in, int inlen)
{
- z_stream* context = void_context;
+ z_stream *context = void_context;
+
+ if (!inlen) {
+ *out_len = 0;
+ return SECSuccess;
+ }
+
context->next_in = (unsigned char*) in;
context->avail_in = inlen;
context->next_out = out;
@@ -6090,12 +6102,6 @@ ssl3_HandleClientHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length)
goto alert_loser;
suite_found:
- /* If we are resuming, we use the previous compression algorithm */
- if (sid) {
- ss->ssl3.hs.compression = sid->u.ssl3.compression;
- goto compression_found;
- }
-
/* Look for a matching compression algorithm. */
for (i = 0; i < comps.len; i++) {
for (j = 0; j < compressionMethodsCount; j++) {