Skip to content

Commit

Permalink
Use ANSI functions explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
computerquip-work committed May 17, 2024
1 parent 0077d73 commit b498697
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions include/wintls/detail/sspi_functions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ inline SecurityFunctionTable* sspi_function_table() {
return impl;
}

inline SECURITY_STATUS AcquireCredentialsHandle(SEC_CHAR* pPrincipal,
inline SECURITY_STATUS AcquireCredentialsHandleA(SEC_CHAR* pPrincipal,
SEC_CHAR* pPackage,
unsigned long fCredentialUse,
void* pvLogonId,
Expand All @@ -31,7 +31,7 @@ inline SECURITY_STATUS AcquireCredentialsHandle(SEC_CHAR* pPrincipal,
void* pvGetKeyArgument,
PCredHandle phCredential,
PTimeStamp ptsExpiry) {
return sspi_function_table()->AcquireCredentialsHandle(pPrincipal,
return sspi_function_table()->AcquireCredentialsHandleA(pPrincipal,
pPackage,
fCredentialUse,
pvLogonId,
Expand All @@ -46,7 +46,7 @@ inline SECURITY_STATUS DeleteSecurityContext(PCtxtHandle phContext) {
return sspi_function_table()->DeleteSecurityContext(phContext);
}

inline SECURITY_STATUS InitializeSecurityContext(PCredHandle phCredential,
inline SECURITY_STATUS InitializeSecurityContextA(PCredHandle phCredential,
PCtxtHandle phContext,
SEC_CHAR* pTargetName,
unsigned long fContextReq,
Expand All @@ -58,7 +58,7 @@ inline SECURITY_STATUS InitializeSecurityContext(PCredHandle phCredential,
PSecBufferDesc pOutput,
unsigned long* pfContextAttr,
PTimeStamp ptsExpiry) {
return sspi_function_table()->InitializeSecurityContext(phCredential,
return sspi_function_table()->InitializeSecurityContextA(phCredential,
phContext,
pTargetName,
fContextReq,
Expand Down
6 changes: 3 additions & 3 deletions include/wintls/detail/sspi_handshake.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class sspi_handshake {
}

TimeStamp expiry;
last_error_ = detail::sspi_functions::AcquireCredentialsHandle(nullptr,
last_error_ = detail::sspi_functions::AcquireCredentialsHandleA(nullptr,
const_cast<SEC_CHAR*>(UNISP_NAME),
static_cast<unsigned>(usage),
nullptr,
Expand All @@ -106,7 +106,7 @@ class sspi_handshake {
DWORD out_flags = 0;

handshake_output_buffers buffers;
last_error_ = detail::sspi_functions::InitializeSecurityContext(cred_handle_.get(),
last_error_ = detail::sspi_functions::InitializeSecurityContextA(cred_handle_.get(),
nullptr,
const_cast<SEC_CHAR*>(server_hostname_.c_str()),
client_context_flags,
Expand Down Expand Up @@ -148,7 +148,7 @@ class sspi_handshake {

switch(handshake_type_) {
case handshake_type::client:
last_error_ = detail::sspi_functions::InitializeSecurityContext(cred_handle_.get(),
last_error_ = detail::sspi_functions::InitializeSecurityContextA(cred_handle_.get(),
ctxt_handle_.get(),
const_cast<SEC_CHAR*>(server_hostname_.c_str()),
client_context_flags,
Expand Down
2 changes: 1 addition & 1 deletion include/wintls/detail/sspi_shutdown.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class sspi_shutdown {
}

DWORD out_flags = 0;
sc = detail::sspi_functions::InitializeSecurityContext(cred_handle_.get(),
sc = detail::sspi_functions::InitializeSecurityContextA(cred_handle_.get(),
ctxt_handle_.get(),
nullptr,
client_context_flags,
Expand Down

0 comments on commit b498697

Please sign in to comment.