[Bug 10040] Steam crashes during the startup

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Nov 11 11:25:09 CST 2007


http://bugs.winehq.org/show_bug.cgi?id=10040





--- Comment #5 from Anastasius Focht <focht at gmx.net>  2007-11-11 11:25:08 ---
Hello again,

I investigated the "MachineGuid" stuff further and collected some info which
might lead to a clean solution without any wine.inf/wineprefixcreate hacks.

It seems whenever a handle for a cryptographic service provider (CSP) is
queried (along with default key container), this "MachineGuid" key gets queried
or (re)generated if missing.

To test this, export the "MachineGuid" key with your registry editor on your
windows machine and delete it.
Use a simple test case, which aquires default CSP just like this little snippet
(nothing more needed):

--- snip ---
HCRYPTPROV hCryptProv = NULL;
if(CryptAcquireContext( &hCryptProv,  NULL, NULL,  PROV_RSA_FULL, 0)) 
{ 
  ...
}
...
--- snip ---

Start registry editor and you will see a new "MachineGuid" got generated.
Restore your old (exported) key.

I suggest following: dlls/rsaenh/rsaenh.c -> RSAENH_CPAcquireContext()
This should be the right place.
Before any "dwFlags" action is taken, query the "MachineGuid" registry key.
If the "MachineGuid" key does not exist create a new one.
Use UuidCreate() and UuidToString() for that and store the result into
registry.

Write a simple test case for verification:

1. if "MachineGuid" key exists, retrieve and store it, delete the key in
registry
2. query a CSP (default one will be sufficient)
3. read the "MachineGuid" key, there should be a new one 
4. restore old one if necessary

Regards


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list