Rebuild credentials if EapPeerBeginSession() did not provide them
Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
parent
67805dc9d1
commit
174baa36c1
@ -505,8 +505,18 @@ EAP_SESSION_HANDLE eap::peer::begin_session(
|
|||||||
// Unpack configuration.
|
// Unpack configuration.
|
||||||
unpack(s->m_cfg, pConnectionData, dwConnectionDataSize);
|
unpack(s->m_cfg, pConnectionData, dwConnectionDataSize);
|
||||||
|
|
||||||
// Unpack credentials.
|
if (dwUserDataSize) {
|
||||||
unpack(s->m_cred, pUserData, dwUserDataSize);
|
// Unpack credentials.
|
||||||
|
unpack(s->m_cred, pUserData, dwUserDataSize);
|
||||||
|
} else {
|
||||||
|
// Regenerate user credentials.
|
||||||
|
user_impersonator impersonating(hTokenImpersonateUser);
|
||||||
|
auto cfg_method = combine_credentials(dwFlags, s->m_cfg, pUserData, dwUserDataSize, s->m_cred);
|
||||||
|
if (!cfg_method) {
|
||||||
|
// Credentials missing or incomplete.
|
||||||
|
throw invalid_argument(__FUNCTION__ " Credentials are not available.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Look-up the provider.
|
// Look-up the provider.
|
||||||
config_method *cfg_method;
|
config_method *cfg_method;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user