From 892e58d9699549456276e97c6ac3b778eb56c778 Mon Sep 17 00:00:00 2001 From: Martin Fleisz Date: Thu, 23 Feb 2023 12:01:09 +0100 Subject: [PATCH] core: Update smartcard settings on all platforms Currently smartcard settings were only updated in the WIN32 code path. This must be done on all platforms to have the correct settings (i.e. pkinitArgs) correctly applied. --- libfreerdp/core/nla.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libfreerdp/core/nla.c b/libfreerdp/core/nla.c index f2ff0f211..c5cdbd362 100644 --- a/libfreerdp/core/nla.c +++ b/libfreerdp/core/nla.c @@ -351,16 +351,16 @@ static BOOL nla_client_setup_identity(rdpNla* nla) } else if (settings->SmartcardLogon) { -#ifdef _WIN32 - CERT_CREDENTIAL_INFO certInfo = { sizeof(CERT_CREDENTIAL_INFO), { 0 } }; - LPSTR marshalledCredentials; - if (smartCardLogonWasDisabled) { if (!nla_adjust_settings_from_smartcard(nla)) return FALSE; } +#ifdef _WIN32 + CERT_CREDENTIAL_INFO certInfo = { sizeof(CERT_CREDENTIAL_INFO), { 0 } }; + LPSTR marshalledCredentials; + memcpy(certInfo.rgbHashOfCert, nla->certSha1, sizeof(certInfo.rgbHashOfCert)); if (!CredMarshalCredentialA(CertCredential, &certInfo, &marshalledCredentials))