Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f9141fdd
Commit
f9141fdd
authored
Sep 11, 2006
by
Paul Vriens
Committed by
Alexandre Julliard
Sep 11, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wintrust: Use the return value of CryptRegisterOIDFunction.
parent
aed4f478
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
register.c
dlls/wintrust/register.c
+20
-2
No files found.
dlls/wintrust/register.c
View file @
f9141fdd
...
...
@@ -740,9 +740,25 @@ HRESULT WINAPI DllRegisterServer(void)
* - One call to CryptSIPRemoveProvider (do we need that?)
*/
/* Testing on native shows that when an error is encountered in one of the CryptRegisterOIDFunction calls
* the rest of these calls is skipped. Registering is however continued for the trust providers.
*
* We are not totally in line with native as there all decoding functions are registered after all encoding
* functions.
*/
#define WINTRUST_REGISTEROID( oid, encode_funcname, decode_funcname ) \
CryptRegisterOIDFunction(X509_ASN_ENCODING, CRYPT_OID_ENCODE_OBJECT_FUNC, oid, SP_POLICY_PROVIDER_DLL_NAME, encode_funcname); \
CryptRegisterOIDFunction(X509_ASN_ENCODING, CRYPT_OID_DECODE_OBJECT_FUNC, oid, SP_POLICY_PROVIDER_DLL_NAME, decode_funcname)
do { \
if (!CryptRegisterOIDFunction(X509_ASN_ENCODING, CRYPT_OID_ENCODE_OBJECT_FUNC, oid, SP_POLICY_PROVIDER_DLL_NAME, encode_funcname)) \
{ \
Res = HRESULT_FROM_WIN32(GetLastError()); \
goto add_trust_providers; \
} \
if (!CryptRegisterOIDFunction(X509_ASN_ENCODING, CRYPT_OID_DECODE_OBJECT_FUNC, oid, SP_POLICY_PROVIDER_DLL_NAME, decode_funcname)) \
{ \
Res = HRESULT_FROM_WIN32(GetLastError()); \
goto add_trust_providers; \
} \
} while (0)
WINTRUST_REGISTEROID
(
SPC_PE_IMAGE_DATA_OBJID
,
WVTAsn1SpcPeImageDataEncode
,
WVTAsn1SpcPeImageDataDecode
);
WINTRUST_REGISTEROID
(
SPC_PE_IMAGE_DATA_STRUCT
,
WVTAsn1SpcPeImageDataEncode
,
WVTAsn1SpcPeImageDataDecode
);
...
...
@@ -773,6 +789,8 @@ HRESULT WINAPI DllRegisterServer(void)
#undef WINTRUST_REGISTEROID
add_trust_providers:
/* Testing on W2K3 shows:
* If we cannot open HKLM\Software\Microsoft\Cryptography\Providers\Trust
* for writing, DllRegisterServer returns S_FALSE. If the key can be opened
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment