crypt32: Fix CertAddCTLContextToStore for CERT_STORE_ADD_USE_EXISTING add disposition.
diff --git a/dlls/crypt32/ctl.c b/dlls/crypt32/ctl.c
index 44b517a..40895fa 100644
--- a/dlls/crypt32/ctl.c
+++ b/dlls/crypt32/ctl.c
@@ -113,7 +113,13 @@
break;
case CERT_STORE_ADD_USE_EXISTING:
if (existing)
+ {
CtlContext_CopyProperties(existing, pCtlContext);
+ if (ppStoreContext)
+ *ppStoreContext = CertDuplicateCTLContext(existing);
+ }
+ else
+ toAdd = CertDuplicateCTLContext(pCtlContext);
break;
default:
FIXME("Unimplemented add disposition %d\n", dwAddDisposition);