fix use of return code from list_provider_keys()

list_provider_keys() returns a Boolean, true == success. But
smartcard_hw_enumerateCerts() expects the return value on success to
be ERROR_SUCCESS == 0, and so inverts success/failure.
This commit is contained in:
Richard E. Silverman 2022-11-16 01:19:38 -05:00 committed by akallabeth
parent 4ddef3e141
commit 2c39bb41a8

View File

@ -460,7 +460,7 @@ static BOOL smartcard_hw_enumerateCerts(const rdpSettings* settings, LPCWSTR csp
status = list_provider_keys(settings, provider, csp, scope, userFilter, domainFilter,
&cert_list, &count);
NCryptFreeObject((NCRYPT_HANDLE)provider);
if (status != ERROR_SUCCESS)
if (!status)
{
WLog_ERR(TAG, "error listing keys from CSP loaded from %s", Pkcs11Module);
goto out;