mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
b=114893 Can't send encrypted mail if encryption cert has not been imported. Smartcard issue.
r=javi sr=alecf a=asa
This commit is contained in:
parent
2c95359558
commit
5b56e1ff00
@ -911,6 +911,13 @@ nsresult nsMsgComposeSecure::MimeCryptoHackCerts(const char *aRecipients,
|
||||
}
|
||||
if (count < 0) return count;
|
||||
|
||||
if (aEncrypt && mSelfEncryptionCert) {
|
||||
// Make sure self's configured cert is prepared for being used
|
||||
// as an email recipient cert.
|
||||
|
||||
mSelfEncryptionCert->SaveSMimeProfile();
|
||||
}
|
||||
|
||||
/* If the message is to be encrypted, then get the recipient certs */
|
||||
if (aEncrypt) {
|
||||
mailbox = mailbox_list;
|
||||
|
@ -204,6 +204,8 @@ interface nsIX509Cert : nsISupports {
|
||||
[noscript] unsigned long getRawDER(out charPtr result);
|
||||
|
||||
PRBool isSameCert(in nsIX509Cert other);
|
||||
|
||||
void saveSMimeProfile();
|
||||
};
|
||||
|
||||
%{C++
|
||||
|
@ -2724,6 +2724,15 @@ nsNSSCertificate::IsSameCert(nsIX509Cert *other, PRBool *result)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsNSSCertificate::SaveSMimeProfile()
|
||||
{
|
||||
if (SECSuccess != CERT_SaveSMimeProfile(mCert, nsnull, nsnull))
|
||||
return NS_ERROR_FAILURE;
|
||||
else
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
/* nsNSSCertificateDB */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user