Bug 1748341 - port ´remove superfluous nsNSSCertificate "constructors"` to Thunderbird. rs=bustage-fix
Port of https://hg.mozilla.org/mozilla-central/rev/7aa1f58a893e --HG-- extra : amend_source : 295959048b5e5dfb9a3232bed51c3164cab1e3b2
This commit is contained in:
Родитель
c30fdc61bb
Коммит
e8ce594a70
|
@ -294,7 +294,7 @@ NS_IMETHODIMP nsCertPicker::PickByUsage(nsIInterfaceRequestor* ctx,
|
|||
while (!CERT_LIST_END(node, certList)) {
|
||||
/* if the cert has at least one e-mail address, check if suitable */
|
||||
if (CERT_GetFirstEmailAddress(node->cert)) {
|
||||
RefPtr<nsNSSCertificate> tempCert(nsNSSCertificate::Create(node->cert));
|
||||
RefPtr<nsNSSCertificate> tempCert(new nsNSSCertificate(node->cert));
|
||||
bool match = false;
|
||||
rv = tempCert->ContainsEmailAddress(emailAddress, &match);
|
||||
if (NS_FAILED(rv)) {
|
||||
|
@ -326,7 +326,7 @@ NS_IMETHODIMP nsCertPicker::PickByUsage(nsIInterfaceRequestor* ctx,
|
|||
!CERT_LIST_END(node, certList.get()) &&
|
||||
CertsToUse < nicknames->numnicknames;
|
||||
node = CERT_LIST_NEXT(node)) {
|
||||
RefPtr<nsNSSCertificate> tempCert(nsNSSCertificate::Create(node->cert));
|
||||
RefPtr<nsNSSCertificate> tempCert(new nsNSSCertificate(node->cert));
|
||||
|
||||
if (tempCert) {
|
||||
nsAutoString i_nickname(
|
||||
|
@ -382,12 +382,7 @@ NS_IMETHODIMP nsCertPicker::PickByUsage(nsIInterfaceRequestor* ctx,
|
|||
for (i = 0, node = CERT_LIST_HEAD(certList); !CERT_LIST_END(node, certList);
|
||||
++i, node = CERT_LIST_NEXT(node)) {
|
||||
if (i == selectedIndex) {
|
||||
RefPtr<nsNSSCertificate> cert = nsNSSCertificate::Create(node->cert);
|
||||
if (!cert) {
|
||||
rv = NS_ERROR_OUT_OF_MEMORY;
|
||||
break;
|
||||
}
|
||||
|
||||
RefPtr<nsNSSCertificate> cert = new nsNSSCertificate(node->cert);
|
||||
cert.forget(_retval);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1149,9 +1149,7 @@ nsMsgComposeSecure::FindCertByEmailAddress(const nsACString& aEmailAddress,
|
|||
|
||||
// |node| now contains the first valid (if aRequireValidCert true)
|
||||
// certificate with correct usage.
|
||||
RefPtr<nsNSSCertificate> nssCert = nsNSSCertificate::Create(node->cert);
|
||||
if (!nssCert) return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
RefPtr<nsNSSCertificate> nssCert = new nsNSSCertificate(node->cert);
|
||||
nssCert.forget(_retval);
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче