Compare commits

..

4 Commits
1.3c ... 1.3d

Author SHA1 Message Date
4fce7f58e1 MSIBuild: bump
Signed-off-by: Simon Rozman <simon@rozman.si>
2021-11-23 14:52:26 +01:00
174baa36c1 Rebuild credentials if EapPeerBeginSession() did not provide them
Signed-off-by: Simon Rozman <simon@rozman.si>
2021-11-23 14:11:57 +01:00
67805dc9d1 Add missing data length check
Signed-off-by: Simon Rozman <simon@rozman.si>
2021-11-23 13:35:48 +01:00
83ad0ef45d Preset version to 1.3d
Signed-off-by: Simon Rozman <simon@rozman.si>
2021-11-23 10:10:50 +01:00
4 changed files with 20 additions and 8 deletions

View File

@@ -20,7 +20,7 @@
// Product version as a single DWORD // Product version as a single DWORD
// Note: Used for version comparison within C/C++ code. // Note: Used for version comparison within C/C++ code.
// //
#define PRODUCT_VERSION 0x01030300 #define PRODUCT_VERSION 0x01030400
// //
// Product version by components // Product version by components
@@ -30,26 +30,26 @@
// //
#define PRODUCT_VERSION_MAJ 1 #define PRODUCT_VERSION_MAJ 1
#define PRODUCT_VERSION_MIN 3 #define PRODUCT_VERSION_MIN 3
#define PRODUCT_VERSION_REV 3 #define PRODUCT_VERSION_REV 4
#define PRODUCT_VERSION_BUILD 0 #define PRODUCT_VERSION_BUILD 0
// //
// Human readable product version and build year for UI // Human readable product version and build year for UI
// //
#define PRODUCT_VERSION_STR "1.3c" #define PRODUCT_VERSION_STR "1.3d"
#define PRODUCT_BUILD_YEAR_STR "2021" #define PRODUCT_BUILD_YEAR_STR "2021"
// //
// Numerical version presentation for ProductVersion propery in // Numerical version presentation for ProductVersion propery in
// MSI packages (syntax: N.N[.N[.N]]) // MSI packages (syntax: N.N[.N[.N]])
// //
#define PRODUCT_VERSION_INST "1.3.3" #define PRODUCT_VERSION_INST "1.3.4"
// //
// The product code for ProductCode property in MSI packages // The product code for ProductCode property in MSI packages
// Replace with new on every version change, regardless how minor it is. // Replace with new on every version change, regardless how minor it is.
// //
#define PRODUCT_VERSION_GUID "{DBC92CC4-4C5C-4E7E-89A4-8A23D1A3E83A}" #define PRODUCT_VERSION_GUID "{7E905978-327E-4097-80F2-C53928B0E589}"
// //
// Product vendor // Product vendor

View File

@@ -411,6 +411,8 @@ namespace eap
throw winstd::win_runtime_error(__FUNCTION__ " Key import failed."); throw winstd::win_runtime_error(__FUNCTION__ " Key import failed.");
// Import the 256-bit AES session key. // Import the 256-bit AES session key.
if (size < 268)
throw std::invalid_argument(__FUNCTION__ " Encrypted data too short.");
winstd::crypt_key key_aes; winstd::crypt_key key_aes;
if (!CryptImportKey(hProv, reinterpret_cast<LPCBYTE>(data), 268, key_rsa, 0, &key_aes)) if (!CryptImportKey(hProv, reinterpret_cast<LPCBYTE>(data), 268, key_rsa, 0, &key_aes))
throw winstd::win_runtime_error(__FUNCTION__ " CryptImportKey failed."); throw winstd::win_runtime_error(__FUNCTION__ " CryptImportKey failed.");

View File

@@ -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);
if (dwUserDataSize) {
// Unpack credentials. // Unpack credentials.
unpack(s->m_cred, pUserData, dwUserDataSize); 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;