зеркало из https://github.com/mozilla/gecko-dev.git
missed as part of last checkin, hack needed when certs come out of crypto context or cache
This commit is contained in:
Родитель
9a08a0a740
Коммит
6f2d3b5cd6
|
@ -421,8 +421,17 @@ loser:
|
|||
/* need to dupe since caller expects new cert */
|
||||
return CERT_DupCertificate(cert);
|
||||
} else {
|
||||
/* this is the only instance */
|
||||
return STAN_GetCERTCertificate(chain[1]);
|
||||
CERTCertificate *rvc;
|
||||
/* XXX hack - if this is the only instance, return it, otherwise
|
||||
* the cert came out of the cache or a crypto context, in
|
||||
* which case it needs to be duped
|
||||
*/
|
||||
if (!chain[1]->decoding) {
|
||||
return STAN_GetCERTCertificate(chain[1]);
|
||||
} else {
|
||||
rvc = STAN_GetCERTCertificate(chain[1]);
|
||||
return CERT_DupCertificate(rvc);
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
|
|
Загрузка…
Ссылка в новой задаче