Commit 4388bdac authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

crypt32: Bail out on registry errors and return the error (if any).

parent 75604e86
...@@ -198,6 +198,7 @@ BOOL WINAPI CryptSIPAddProvider(SIP_ADD_NEWPROVIDER *psNewProv) ...@@ -198,6 +198,7 @@ BOOL WINAPI CryptSIPAddProvider(SIP_ADD_NEWPROVIDER *psNewProv)
static const WCHAR szVerify[] = { static const WCHAR szVerify[] = {
'V','e','r','i','f','y', 'V','e','r','i','f','y',
'I','n','d','i','r','e','c','t','D','a','t','a',0}; 'I','n','d','i','r','e','c','t','D','a','t','a',0};
LONG r = ERROR_SUCCESS;
TRACE("%p\n", psNewProv); TRACE("%p\n", psNewProv);
...@@ -220,8 +221,9 @@ BOOL WINAPI CryptSIPAddProvider(SIP_ADD_NEWPROVIDER *psNewProv) ...@@ -220,8 +221,9 @@ BOOL WINAPI CryptSIPAddProvider(SIP_ADD_NEWPROVIDER *psNewProv)
debugstr_w( psNewProv->pwszIsFunctionName ) ); debugstr_w( psNewProv->pwszIsFunctionName ) );
#define CRYPT_SIPADDPROV( key, field ) \ #define CRYPT_SIPADDPROV( key, field ) \
CRYPT_SIPWriteFunction( psNewProv->pgSubject, key, \ r = CRYPT_SIPWriteFunction( psNewProv->pgSubject, key, \
psNewProv->pwszDLLFileName, psNewProv->field) psNewProv->pwszDLLFileName, psNewProv->field); \
if (r != ERROR_SUCCESS) goto end_function
CRYPT_SIPADDPROV( szPutSigned, pwszPutFuncName ); CRYPT_SIPADDPROV( szPutSigned, pwszPutFuncName );
CRYPT_SIPADDPROV( szGetSigned, pwszGetFuncName ); CRYPT_SIPADDPROV( szGetSigned, pwszGetFuncName );
...@@ -232,6 +234,14 @@ BOOL WINAPI CryptSIPAddProvider(SIP_ADD_NEWPROVIDER *psNewProv) ...@@ -232,6 +234,14 @@ BOOL WINAPI CryptSIPAddProvider(SIP_ADD_NEWPROVIDER *psNewProv)
#undef CRYPT_SIPADDPROV #undef CRYPT_SIPADDPROV
end_function:
if (r != ERROR_SUCCESS)
{
SetLastError(r);
return FALSE;
}
return TRUE; return TRUE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment