mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
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:
parent
07bda86df6
commit
a6e10ab759
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user