Bug 583908: Test the SSL_ENABLE_FALSE_START macro to allow building

with NSS 3.12.7 or older.  r=kaie.  approval2.0+ by sayrer.
This commit is contained in:
Wan-Teh Chang 2010-08-06 18:01:21 -07:00
parent 32175657dc
commit cb9b691bb6

View File

@ -1708,8 +1708,10 @@ nsNSSComponent::InitializeNSS(PRBool showWarningBox)
SSL_OptionSetDefault(SSL_ENABLE_RENEGOTIATION,
enabled ? SSL_RENEGOTIATE_UNRESTRICTED : SSL_RENEGOTIATE_REQUIRES_XTN);
#ifdef SSL_ENABLE_FALSE_START // Requires NSS 3.12.8
mPrefBranch->GetBoolPref("security.ssl.enable_false_start", &enabled);
SSL_OptionSetDefault(SSL_ENABLE_FALSE_START, enabled);
#endif
// Disable any ciphers that NSS might have enabled by default
for (PRUint16 i = 0; i < SSL_NumImplementedCiphers; ++i)
@ -2238,9 +2240,11 @@ nsNSSComponent::Observe(nsISupports *aSubject, const char *aTopic,
PRInt32 warnLevel = 1;
mPrefBranch->GetIntPref("security.ssl.warn_missing_rfc5746", &warnLevel);
nsSSLIOLayerHelpers::setWarnLevelMissingRFC5746(warnLevel);
#ifdef SSL_ENABLE_FALSE_START // Requires NSS 3.12.8
} else if (prefName.Equals("security.ssl.enable_false_start")) {
mPrefBranch->GetBoolPref("security.ssl.enable_false_start", &enabled);
SSL_OptionSetDefault(SSL_ENABLE_FALSE_START, enabled);
#endif
} else if (prefName.Equals("security.OCSP.enabled")
|| prefName.Equals("security.OCSP.require")) {
setOCSPOptions(mPrefBranch);