зеркало из https://github.com/mozilla/gecko-dev.git
Backing out the "early ev verification" patch from bug 406755, as an attempt to fix a tinderbox test failure (crash).
This commit is contained in:
Родитель
5a9e988ed2
Коммит
7213ca4454
|
@ -914,20 +914,7 @@ SECStatus PR_CALLBACK AuthCertificateCallback(void* client_data, PRFileDesc* fd,
|
||||||
CERTCertificateCleaner serverCertCleaner(serverCert);
|
CERTCertificateCleaner serverCertCleaner(serverCert);
|
||||||
|
|
||||||
if (serverCert) {
|
if (serverCert) {
|
||||||
nsNSSSocketInfo* infoObject = (nsNSSSocketInfo*) fd->higher->secret;
|
|
||||||
nsRefPtr<nsSSLStatus> status = infoObject->SSLStatus();
|
|
||||||
nsRefPtr<nsNSSCertificate> nsc;
|
|
||||||
|
|
||||||
if (!status || !status->mServerCert) {
|
|
||||||
nsc = new nsNSSCertificate(serverCert);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (SECSuccess == rv) {
|
if (SECSuccess == rv) {
|
||||||
if (nsc) {
|
|
||||||
PRBool dummyIsEV;
|
|
||||||
nsc->GetIsExtendedValidation(&dummyIsEV); // the nsc object will cache the status
|
|
||||||
}
|
|
||||||
|
|
||||||
CERTCertList *certList = CERT_GetCertChainFromCert(serverCert, PR_Now(), certUsageSSLCA);
|
CERTCertList *certList = CERT_GetCertChainFromCert(serverCert, PR_Now(), certUsageSSLCA);
|
||||||
|
|
||||||
nsCOMPtr<nsINSSComponent> nssComponent;
|
nsCOMPtr<nsINSSComponent> nssComponent;
|
||||||
|
@ -971,12 +958,15 @@ SECStatus PR_CALLBACK AuthCertificateCallback(void* client_data, PRFileDesc* fd,
|
||||||
// The connection may get terminated, for example, if the server requires
|
// The connection may get terminated, for example, if the server requires
|
||||||
// a client cert. Let's provide a minimal SSLStatus
|
// a client cert. Let's provide a minimal SSLStatus
|
||||||
// to the caller that contains at least the cert and its status.
|
// to the caller that contains at least the cert and its status.
|
||||||
|
nsNSSSocketInfo* infoObject = (nsNSSSocketInfo*) fd->higher->secret;
|
||||||
|
|
||||||
|
nsRefPtr<nsSSLStatus> status = infoObject->SSLStatus();
|
||||||
if (!status) {
|
if (!status) {
|
||||||
status = new nsSSLStatus();
|
status = new nsSSLStatus();
|
||||||
infoObject->SetSSLStatus(status);
|
infoObject->SetSSLStatus(status);
|
||||||
}
|
}
|
||||||
if (status && !status->mServerCert) {
|
if (status && !status->mServerCert) {
|
||||||
status->mServerCert = nsc;
|
status->mServerCert = new nsNSSCertificate(serverCert);
|
||||||
PR_LOG(gPIPNSSLog, PR_LOG_DEBUG,
|
PR_LOG(gPIPNSSLog, PR_LOG_DEBUG,
|
||||||
("AuthCertificateCallback setting NEW cert %p\n", status->mServerCert.get()));
|
("AuthCertificateCallback setting NEW cert %p\n", status->mServerCert.get()));
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче