crypt32: Don't crash if adding to a provider store fails.
This commit is contained in:
parent
30de39b2a7
commit
9686e7b286
@ -78,7 +78,7 @@ static BOOL CRYPT_ProvAddCert(PWINECRYPT_CERTSTORE store, void *cert,
|
|||||||
/* dirty trick: replace the returned context's hCertStore with
|
/* dirty trick: replace the returned context's hCertStore with
|
||||||
* store.
|
* store.
|
||||||
*/
|
*/
|
||||||
if (ppStoreContext)
|
if (ret && ppStoreContext)
|
||||||
(*(PCERT_CONTEXT *)ppStoreContext)->hCertStore = store;
|
(*(PCERT_CONTEXT *)ppStoreContext)->hCertStore = store;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -145,7 +145,7 @@ static BOOL CRYPT_ProvAddCRL(PWINECRYPT_CERTSTORE store, void *crl,
|
|||||||
/* dirty trick: replace the returned context's hCertStore with
|
/* dirty trick: replace the returned context's hCertStore with
|
||||||
* store.
|
* store.
|
||||||
*/
|
*/
|
||||||
if (ppStoreContext)
|
if (ret && ppStoreContext)
|
||||||
(*(PCRL_CONTEXT *)ppStoreContext)->hCertStore = store;
|
(*(PCRL_CONTEXT *)ppStoreContext)->hCertStore = store;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -212,7 +212,7 @@ static BOOL CRYPT_ProvAddCTL(PWINECRYPT_CERTSTORE store, void *ctl,
|
|||||||
/* dirty trick: replace the returned context's hCertStore with
|
/* dirty trick: replace the returned context's hCertStore with
|
||||||
* store.
|
* store.
|
||||||
*/
|
*/
|
||||||
if (ppStoreContext)
|
if (ret && ppStoreContext)
|
||||||
(*(PCTL_CONTEXT *)ppStoreContext)->hCertStore = store;
|
(*(PCTL_CONTEXT *)ppStoreContext)->hCertStore = store;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user