https://bugs.winehq.org/show_bug.cgi?id=54687
Bug ID: 54687 Summary: CertGetNameStringW with dwType=CERT_NAME_ATTR_TYPE and pvTypePara missing additional fallbacks Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: crypt32 Assignee: wine-bugs@winehq.org Reporter: twhitehead@gmail.com Distribution: ---
Created attachment 74198 --> https://bugs.winehq.org/attachment.cgi?id=74198 Small program to test certificates for fallback behaviour
What happens when you call CertGetNameStringW with dwType=CERT_NAME_ATTR_TYPE and pvTypePara=NULL is undocumented. Testing with Windows reveals that it returns the first existing name entry for email, CN, OU, or O. Wine only tries to return email.
This results in the LibOVR runtime dll failing to verify as reported here
https://github.com/LibreVR/Revive/issues/1571#issuecomment-1465240925
I have attached a short Windows program you can try this out for yourself. You can generate certificates for it by running
$ openssl req -x509 -newkey rsa:2048 -keyout cert.key -days 1825 -outform der -out cert.der
and then running the program and passing them to it.