Support for read-only configurations added
This commit is contained in:
@@ -280,7 +280,10 @@ bool eap::credentials_pass::retrieve(_In_ LPCTSTR pszTargetName, _Out_ EAP_ERROR
|
||||
return false;
|
||||
}
|
||||
|
||||
m_identity = cred->UserName;
|
||||
if (cred->UserName)
|
||||
m_identity = cred->UserName;
|
||||
else
|
||||
m_identity.clear();
|
||||
|
||||
// Decrypt the password using user's key.
|
||||
string password_base64;
|
||||
|
@@ -150,7 +150,7 @@ bool eap::module::encrypt(_In_ HCRYPTPROV hProv, _In_bytecount_(size) const void
|
||||
vector<unsigned char, sanitizing_allocator<unsigned char> > buf(size);
|
||||
memcpy(buf.data(), data, size);
|
||||
if (!CryptGetKeyParam(key, KP_BLOCKLEN, dwBlockLen, 0)) dwBlockLen = 0;
|
||||
buf.reserve((size + dwBlockLen - 1) / dwBlockLen * dwBlockLen);
|
||||
buf.reserve(std::max<size_t>((size + dwBlockLen - 1) / dwBlockLen, 1) * dwBlockLen);
|
||||
|
||||
// Encrypt the data using our public key.
|
||||
if (!CryptEncrypt(key, hHash, TRUE, 0, buf)) {
|
||||
|
Reference in New Issue
Block a user