File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -94,8 +94,10 @@ class credentials
94
94
// / <param name="username">User name as a string.</param>
95
95
// / <param name="password">Password as a string.</param>
96
96
credentials (utility::string_t username, const utility::string_t &password) :
97
- m_username (std::move(username)),
98
- m_password (password)
97
+ m_username (std::move(username))
98
+ #if defined(_MS_WINDOWS)
99
+ , m_password(password)
100
+ #endif
99
101
{}
100
102
101
103
// / <summary>
Original file line number Diff line number Diff line change @@ -858,10 +858,10 @@ class winhttp_client : public _http_client_communicator
858
858
_In_ winhttp_request_context * p_request_context,
859
859
_In_ DWORD error = 0 )
860
860
{
861
- http_response & response = p_request_context->m_response ;
862
861
http_request & request = p_request_context->m_request ;
863
862
864
- _ASSERTE (response.status_code () == status_codes::Unauthorized || response.status_code () == status_codes::ProxyAuthRequired
863
+ _ASSERTE (p_request_context->m_response .status_code () == status_codes::Unauthorized
864
+ || p_request_context->m_response .status_code () == status_codes::ProxyAuthRequired
865
865
|| error == ERROR_WINHTTP_RESEND_REQUEST);
866
866
867
867
// Check if the saved read position is valid
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ win32_encryption::win32_encryption(const std::wstring &data) :
105
105
{
106
106
m_buffer.resize (m_buffer.size () + CRYPTPROTECTMEMORY_BLOCK_SIZE - mod);
107
107
}
108
- if (!CryptProtectMemory (m_buffer.data (), m_buffer.size (), CRYPTPROTECTMEMORY_SAME_PROCESS))
108
+ if (!CryptProtectMemory (m_buffer.data (), static_cast <DWORD>( m_buffer.size () ), CRYPTPROTECTMEMORY_SAME_PROCESS))
109
109
{
110
110
throw ::utility::details::create_system_error (GetLastError ());
111
111
}
@@ -122,7 +122,7 @@ plaintext_string win32_encryption::decrypt() const
122
122
auto data = plaintext_string (new std::wstring (reinterpret_cast <const std::wstring::value_type *>(m_buffer.data ()), m_buffer.size () / 2 ));
123
123
if (!CryptUnprotectMemory (
124
124
const_cast <std::wstring::value_type *>(data->c_str ()),
125
- m_buffer.size (),
125
+ static_cast <DWORD>( m_buffer.size () ),
126
126
CRYPTPROTECTMEMORY_SAME_PROCESS))
127
127
{
128
128
throw ::utility::details::create_system_error (GetLastError ());
You can’t perform that action at this time.
0 commit comments