зеркало из https://github.com/mozilla/gecko-dev.git
Bug 938046 - Part 3. Iterate only through valid users on getchain r=dkeeler
This commit is contained in:
Родитель
e37fbe8375
Коммит
c653f8bfb9
|
@ -856,10 +856,18 @@ nsNSSCertificate::GetChain(nsIArray **_rvChain)
|
|||
nullptr, /*XXX fixme*/
|
||||
CertVerifier::FLAG_LOCAL_ONLY,
|
||||
&pkixNssChain);
|
||||
// This is the whitelist of all non-SSLServer usages that are supported by
|
||||
// verifycert.
|
||||
const int otherUsagesToTest = certificateUsageSSLClient |
|
||||
certificateUsageSSLCA |
|
||||
certificateUsageEmailSigner |
|
||||
certificateUsageEmailRecipient |
|
||||
certificateUsageObjectSigner |
|
||||
certificateUsageStatusResponder;
|
||||
for (int usage = certificateUsageSSLClient;
|
||||
usage < certificateUsageAnyCA && !pkixNssChain;
|
||||
usage = usage << 1) {
|
||||
if (usage == certificateUsageSSLServer) {
|
||||
if ((usage & otherUsagesToTest) == 0) {
|
||||
continue;
|
||||
}
|
||||
PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("pipnss: PKIX attempting chain(%d) for '%s'\n",usage, mCert->nickname));
|
||||
|
|
Загрузка…
Ссылка в новой задаче