From 79f155021fab2af74709ad7cd0cf34ca0a954411 Mon Sep 17 00:00:00 2001 From: "wtc%google.com" Date: Wed, 10 Feb 2010 18:33:24 +0000 Subject: [PATCH] Bug 526910: Increase the max response length for CRL downloads to 512 KB. r=alexei. git-svn-id: svn://10.0.0.236/trunk@259677 18797224-902f-48f8-a5cc-f745e15eee43 --- .../libpkix/pkix_pl_nss/module/pkix_pl_pk11certstore.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mozilla/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_pk11certstore.c b/mozilla/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_pk11certstore.c index af6ed936a86..945c251f5f6 100755 --- a/mozilla/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_pk11certstore.c +++ b/mozilla/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_pk11certstore.c @@ -43,6 +43,13 @@ #include "pkix_pl_pk11certstore.h" +/* + * PKIX_DEFAULT_MAX_RESPONSE_LENGTH (64 * 1024) is too small for downloading + * CRLs. We observed CRLs of sizes 338759 and 439035 in practice. So we + * need to use a higher max response length for CRLs. + */ +#define PKIX_DEFAULT_MAX_CRL_RESPONSE_LENGTH (512 * 1024) + /* --Private-Pk11CertStore-Functions---------------------------------- */ /* @@ -871,6 +878,8 @@ DownloadCrl(pkix_pl_CrlDp *dp, PKIX_PL_CRL **crl, myHttpResponseDataLen = ((PKIX_PL_NssContext*)plContext)->maxResponseLength; + if (myHttpResponseDataLen < PKIX_DEFAULT_MAX_CRL_RESPONSE_LENGTH) + myHttpResponseDataLen = PKIX_DEFAULT_MAX_CRL_RESPONSE_LENGTH; /* We use a non-zero timeout, which means: - the client will use blocking I/O