[Git][wine/wine][master] crypt32: Avoid conflict between unnamed containers.
Alexandre Julliard pushed to branch master at wine / wine Commits: e9ab7a9d by Benoît Legat at 2026-06-30T12:07:02+02:00 crypt32: Avoid conflict between unnamed containers. 1. PFXImport #1: CryptAcquireContextW(NULL container, CRYPT_NEWKEYSET) -> CSP creates container "blegat" (the default user name) and imports key K1 into it. set_key_prov_info then writes pwszContainerName="blegat" onto cert1. 2. PFXImport #2: same call fails with NTE_EXISTS (the default container already exists), the existing retry opens it without CRYPT_NEWKEYSET, then CryptImportKey writes K2 into that container, overwriting K1. set_key_prov_info writes pwszContainerName="blegat" onto cert2. 3. State: container "blegat" holds K2. Cert1's CRYPT_KEY_PROV_INFO.pwszContainerName still says "blegat". Anyone asking "what's cert1's private key?" reads its container name, opens "blegat", and gets K2, the second cert's key. Create GUID using UuidCreate, UuidToStringW and RpcStringFreeW from rpcrt4 - - - - - 5 changed files: - dlls/crypt32/Makefile.in - dlls/crypt32/cert.c - dlls/crypt32/crypt32_private.h - dlls/crypt32/pfx.c - dlls/crypt32/tests/store.c View it on GitLab: https://gitlab.winehq.org/wine/wine/-/commit/e9ab7a9d637a5fe2d3f1e4a7058d660... -- View it on GitLab: https://gitlab.winehq.org/wine/wine/-/commit/e9ab7a9d637a5fe2d3f1e4a7058d660... You're receiving this email because of your account on gitlab.winehq.org. Manage all notifications: https://gitlab.winehq.org/-/profile/notifications | Help: https://gitlab.winehq.org/help
participants (1)
-
Alexandre Julliard (@julliard)