From d69e8b3f6aa8231e6bf154409a05becf3c6b5eba Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Thu, 21 Jul 2016 12:30:46 +0200 Subject: [PATCH] EapPeerGetIdentity() accounts for missing cached credentials now --- EAPMethods/src/Main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/EAPMethods/src/Main.cpp b/EAPMethods/src/Main.cpp index acd7a5b..66df252 100644 --- a/EAPMethods/src/Main.cpp +++ b/EAPMethods/src/Main.cpp @@ -238,10 +238,10 @@ DWORD APIENTRY EapPeerGetIdentity( else { eap::config_providers cfg(g_peer); _EAPMETHOD_PEER::credentials_type cred(g_peer); - if (!g_peer.unpack(cfg, pConnectionData, dwConnectionDataSize, ppEapError) || - !g_peer.unpack(cred, pUserData, dwUserDataSize, ppEapError) || - !g_peer.get_identity(dwFlags, cfg, cred, hTokenImpersonateUser, pfInvokeUI, ppwszIdentity, ppEapError) || - !g_peer.pack(cred, ppUserDataOut, pdwUserDataOutSize, ppEapError)) + if ( !g_peer.unpack(cfg, pConnectionData, dwConnectionDataSize, ppEapError) || + dwUserDataSize && !g_peer.unpack(cred, pUserData, dwUserDataSize, ppEapError) || + !g_peer.get_identity(dwFlags, cfg, cred, hTokenImpersonateUser, pfInvokeUI, ppwszIdentity, ppEapError) || + !g_peer.pack(cred, ppUserDataOut, pdwUserDataOutSize, ppEapError)) { if (*ppEapError) { g_peer.log_error(*ppEapError);