diff --git a/lib/EAPBase/src/Credentials.cpp b/lib/EAPBase/src/Credentials.cpp index 3e689f2..ebf854b 100644 --- a/lib/EAPBase/src/Credentials.cpp +++ b/lib/EAPBase/src/Credentials.cpp @@ -1,5 +1,5 @@ /* - Copyright 2015-2016 Amebis + Copyright 2015-2018 Amebis Copyright 2016 GÉANT This file is part of GÉANTLink. @@ -919,8 +919,8 @@ inline static basic_string<_Elem, _Traits, _Ax> kph_encode(_In_ unsigned char da { // Encode one byte of data. _Elem str[3] = { - 'A' + (data >> 4 ), - 'a' + (data & 0x0f), + static_cast<_Elem>('A' + (data >> 4 )), + static_cast<_Elem>('a' + (data & 0x0f)), }; return str; } diff --git a/lib/TTLS/src/Method.cpp b/lib/TTLS/src/Method.cpp index 386d9f9..4424c00 100644 --- a/lib/TTLS/src/Method.cpp +++ b/lib/TTLS/src/Method.cpp @@ -424,7 +424,7 @@ void eap::method_ttls::begin_session( PCCERT_CONTEXT certs[] = { m_cred.m_cert ? (PCCERT_CONTEXT)m_cred.m_cert : NULL }; SCHANNEL_CRED cred = { SCHANNEL_CRED_VERSION, // dwVersion - m_cred.m_cert ? 1 : 0, // cCreds + m_cred.m_cert ? 1ul : 0ul, // cCreds certs, // paCred NULL, // hRootStore: Not valid for client credentials 0, // cMappers @@ -445,7 +445,7 @@ void eap::method_ttls::begin_session( SCH_CRED_IGNORE_REVOCATION_OFFLINE | // dwFlags: Ignore offline-revocation errors - we do not expect to have network connection yet SCH_CRED_NO_DEFAULT_CREDS | // dwFlags: If client certificate we provided is not acceptable, do not try to select one on your own (m_cfg.m_server_names.empty() ? SCH_CRED_NO_SERVERNAME_CHECK : 0) | // dwFlags: When no expected server name is given, do not do the server name check. - 0x00400000 /*SCH_USE_STRONG_CRYPTO*/, // dwFlags: Do not use broken ciphers + 0x00400000ul /*SCH_USE_STRONG_CRYPTO*/, // dwFlags: Do not use broken ciphers 0 // dwCredFormat }; SECURITY_STATUS stat = m_sc_cred.acquire(NULL, UNISP_NAME, SECPKG_CRED_OUTBOUND, NULL, &cred);