summaryrefslogtreecommitdiffstats
path: root/libfreerdp/core/smartcardlogon.c
diff options
context:
space:
mode:
Diffstat (limited to 'libfreerdp/core/smartcardlogon.c')
-rw-r--r--libfreerdp/core/smartcardlogon.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libfreerdp/core/smartcardlogon.c b/libfreerdp/core/smartcardlogon.c
index d5907cf..f3f5581 100644
--- a/libfreerdp/core/smartcardlogon.c
+++ b/libfreerdp/core/smartcardlogon.c
@@ -222,11 +222,14 @@ static BOOL set_info_certificate(SmartcardCertInfo* cert, BYTE* certBytes, DWORD
return FALSE;
}
- if (userFilter && cert->userHint && strcmp(cert->userHint, userFilter) != 0)
+ if (userFilter && (!cert->upn || (strcmp(cert->upn, userFilter) != 0)))
{
- WLog_DBG(TAG, "discarding non matching cert by user %s@%s", cert->userHint,
- cert->domainHint);
- return FALSE;
+ if (cert->userHint && strcmp(cert->userHint, userFilter) != 0)
+ {
+ WLog_DBG(TAG, "discarding non matching cert by user %s@%s", cert->userHint,
+ cert->domainHint);
+ return FALSE;
+ }
}
if (domainFilter && cert->domainHint && strcmp(cert->domainHint, domainFilter) != 0)