b=142147 Viewing signed message crashes Mozilla, if I did not log-in into the FIPS module

r=javi sr=bryner
This commit is contained in:
kaie%netscape.com 2002-08-23 10:10:17 +00:00
Родитель 07bda86df6
Коммит a6e10ab759
2 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -578,8 +578,12 @@ NS_IMETHODIMP nsCMSDecoder::Finish(nsICMSMessage ** aCMSMsg)
NSSCMSMessage *cmsMsg;
cmsMsg = NSS_CMSDecoder_Finish(m_dcx);
if (cmsMsg) {
nsCOMPtr<nsICMSMessage> msg = new nsCMSMessage(cmsMsg);
*aCMSMsg = msg;
nsCMSMessage *obj = new nsCMSMessage(cmsMsg);
// The NSS object cmsMsg still carries a reference to the context
// we gave it on construction.
// Make sure the context will live long enough.
obj->referenceContext(m_ctx);
*aCMSMsg = obj;
NS_ADDREF(*aCMSMsg);
}
return NS_OK;

Просмотреть файл

@ -76,8 +76,10 @@ public:
nsCMSMessage(NSSCMSMessage* aCMSMsg);
virtual ~nsCMSMessage();
void referenceContext(nsIInterfaceRequestor* aContext) {m_ctx = aContext;}
NSSCMSMessage* getCMS() {return m_cmsMsg;};
private:
nsCOMPtr<nsIInterfaceRequestor> m_ctx;
NSSCMSMessage * m_cmsMsg;
NSSCMSSignerInfo* GetTopLevelSignerInfo();
nsresult CommonVerifySignature(unsigned char* aDigestData, PRUint32 aDigestDataLen);