mirror of
https://github.com/moparisthebest/curl
synced 2024-10-31 15:45:12 -04:00
Win32: downplay MS bazillion type synonyms game
Avoid usage of some MS type synonyms to allow compilation with compiler headers that don't define these, using simpler synonyms.
This commit is contained in:
parent
220776de6b
commit
d56e8bcc8a
@ -394,7 +394,7 @@ CURLcode Curl_ntlm_create_type1_message(const char *userp,
|
|||||||
SecBuffer buf;
|
SecBuffer buf;
|
||||||
SecBufferDesc desc;
|
SecBufferDesc desc;
|
||||||
SECURITY_STATUS status;
|
SECURITY_STATUS status;
|
||||||
ULONG attrs;
|
unsigned long attrs;
|
||||||
const char *user;
|
const char *user;
|
||||||
const char *domain = "";
|
const char *domain = "";
|
||||||
size_t userlen = 0;
|
size_t userlen = 0;
|
||||||
@ -461,7 +461,7 @@ CURLcode Curl_ntlm_create_type1_message(const char *userp,
|
|||||||
ntlm->p_identity = NULL;
|
ntlm->p_identity = NULL;
|
||||||
|
|
||||||
status = s_pSecFn->AcquireCredentialsHandle(NULL,
|
status = s_pSecFn->AcquireCredentialsHandle(NULL,
|
||||||
(SECURITY_PSTR) TEXT("NTLM"),
|
(TCHAR *) TEXT("NTLM"),
|
||||||
SECPKG_CRED_OUTBOUND, NULL,
|
SECPKG_CRED_OUTBOUND, NULL,
|
||||||
ntlm->p_identity, NULL, NULL,
|
ntlm->p_identity, NULL, NULL,
|
||||||
&ntlm->handle, &tsDummy);
|
&ntlm->handle, &tsDummy);
|
||||||
@ -476,7 +476,7 @@ CURLcode Curl_ntlm_create_type1_message(const char *userp,
|
|||||||
buf.pvBuffer = ntlmbuf;
|
buf.pvBuffer = ntlmbuf;
|
||||||
|
|
||||||
status = s_pSecFn->InitializeSecurityContext(&ntlm->handle, NULL,
|
status = s_pSecFn->InitializeSecurityContext(&ntlm->handle, NULL,
|
||||||
(SECURITY_PSTR) TEXT(""),
|
(TCHAR *) TEXT(""),
|
||||||
ISC_REQ_CONFIDENTIALITY |
|
ISC_REQ_CONFIDENTIALITY |
|
||||||
ISC_REQ_REPLAY_DETECT |
|
ISC_REQ_REPLAY_DETECT |
|
||||||
ISC_REQ_CONNECTION,
|
ISC_REQ_CONNECTION,
|
||||||
@ -631,7 +631,7 @@ CURLcode Curl_ntlm_create_type3_message(struct SessionHandle *data,
|
|||||||
SecBufferDesc type_2_desc;
|
SecBufferDesc type_2_desc;
|
||||||
SecBufferDesc type_3_desc;
|
SecBufferDesc type_3_desc;
|
||||||
SECURITY_STATUS status;
|
SECURITY_STATUS status;
|
||||||
ULONG attrs;
|
unsigned long attrs;
|
||||||
TimeStamp tsDummy; /* For Windows 9x compatibility of SSPI calls */
|
TimeStamp tsDummy; /* For Windows 9x compatibility of SSPI calls */
|
||||||
|
|
||||||
(void)passwdp;
|
(void)passwdp;
|
||||||
@ -652,7 +652,7 @@ CURLcode Curl_ntlm_create_type3_message(struct SessionHandle *data,
|
|||||||
|
|
||||||
status = s_pSecFn->InitializeSecurityContext(&ntlm->handle,
|
status = s_pSecFn->InitializeSecurityContext(&ntlm->handle,
|
||||||
&ntlm->c_handle,
|
&ntlm->c_handle,
|
||||||
(SECURITY_PSTR) TEXT(""),
|
(TCHAR *) TEXT(""),
|
||||||
ISC_REQ_CONFIDENTIALITY |
|
ISC_REQ_CONFIDENTIALITY |
|
||||||
ISC_REQ_REPLAY_DETECT |
|
ISC_REQ_REPLAY_DETECT |
|
||||||
ISC_REQ_CONNECTION,
|
ISC_REQ_CONNECTION,
|
||||||
|
@ -100,7 +100,7 @@ schannel_connect_step1(struct connectdata *conn, int sockindex)
|
|||||||
#ifdef ENABLE_IPV6
|
#ifdef ENABLE_IPV6
|
||||||
struct in6_addr addr6;
|
struct in6_addr addr6;
|
||||||
#endif
|
#endif
|
||||||
LPTSTR host_name;
|
TCHAR *host_name;
|
||||||
|
|
||||||
infof(data, "schannel: connecting to %s:%hu (step 1/3)\n",
|
infof(data, "schannel: connecting to %s:%hu (step 1/3)\n",
|
||||||
conn->host.name, conn->remote_port);
|
conn->host.name, conn->remote_port);
|
||||||
@ -263,7 +263,7 @@ schannel_connect_step2(struct connectdata *conn, int sockindex)
|
|||||||
SecBuffer inbuf[2];
|
SecBuffer inbuf[2];
|
||||||
SecBufferDesc inbuf_desc;
|
SecBufferDesc inbuf_desc;
|
||||||
SECURITY_STATUS sspi_status = SEC_E_OK;
|
SECURITY_STATUS sspi_status = SEC_E_OK;
|
||||||
LPTSTR host_name;
|
TCHAR *host_name;
|
||||||
|
|
||||||
infof(data, "schannel: connecting to %s:%hu (step 2/3)\n",
|
infof(data, "schannel: connecting to %s:%hu (step 2/3)\n",
|
||||||
conn->host.name, conn->remote_port);
|
conn->host.name, conn->remote_port);
|
||||||
|
@ -89,9 +89,9 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy,
|
|||||||
SecBuffer out_sec_buff;
|
SecBuffer out_sec_buff;
|
||||||
SecBufferDesc in_buff_desc;
|
SecBufferDesc in_buff_desc;
|
||||||
SecBuffer in_sec_buff;
|
SecBuffer in_sec_buff;
|
||||||
ULONG context_attributes;
|
unsigned long context_attributes;
|
||||||
TimeStamp lifetime;
|
TimeStamp lifetime;
|
||||||
LPTSTR sname;
|
TCHAR *sname;
|
||||||
int ret;
|
int ret;
|
||||||
size_t len = 0, input_token_len = 0;
|
size_t len = 0, input_token_len = 0;
|
||||||
bool gss = FALSE;
|
bool gss = FALSE;
|
||||||
@ -138,7 +138,7 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy,
|
|||||||
|
|
||||||
if(!neg_ctx->output_token) {
|
if(!neg_ctx->output_token) {
|
||||||
PSecPkgInfo SecurityPackage;
|
PSecPkgInfo SecurityPackage;
|
||||||
ret = s_pSecFn->QuerySecurityPackageInfo((SECURITY_PSTR) TEXT("Negotiate"),
|
ret = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT("Negotiate"),
|
||||||
&SecurityPackage);
|
&SecurityPackage);
|
||||||
if(ret != SEC_E_OK)
|
if(ret != SEC_E_OK)
|
||||||
return -1;
|
return -1;
|
||||||
@ -168,7 +168,7 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy,
|
|||||||
|
|
||||||
neg_ctx->status =
|
neg_ctx->status =
|
||||||
s_pSecFn->AcquireCredentialsHandle(NULL,
|
s_pSecFn->AcquireCredentialsHandle(NULL,
|
||||||
(SECURITY_PSTR) TEXT("Negotiate"),
|
(TCHAR *) TEXT("Negotiate"),
|
||||||
SECPKG_CRED_OUTBOUND, NULL, NULL,
|
SECPKG_CRED_OUTBOUND, NULL, NULL,
|
||||||
NULL, NULL, neg_ctx->credentials,
|
NULL, NULL, neg_ctx->credentials,
|
||||||
&lifetime);
|
&lifetime);
|
||||||
|
@ -31,8 +31,8 @@
|
|||||||
#include "curl_multibyte.h"
|
#include "curl_multibyte.h"
|
||||||
|
|
||||||
#ifdef WANT_IDN_PROTOTYPES
|
#ifdef WANT_IDN_PROTOTYPES
|
||||||
WINBASEAPI int WINAPI IdnToAscii(DWORD, LPCWSTR, int, LPWSTR, int);
|
WINBASEAPI int WINAPI IdnToAscii(DWORD, const WCHAR *, int, WCHAR *, int);
|
||||||
WINBASEAPI int WINAPI IdnToUnicode(DWORD, LPCWSTR, int, LPWSTR, int);
|
WINBASEAPI int WINAPI IdnToUnicode(DWORD, const WCHAR *, int, WCHAR *, int);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define IDN_MAX_LENGTH 255
|
#define IDN_MAX_LENGTH 255
|
||||||
|
@ -90,7 +90,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
|
|||||||
TimeStamp expiry;
|
TimeStamp expiry;
|
||||||
char *service_name = NULL;
|
char *service_name = NULL;
|
||||||
unsigned short us_length;
|
unsigned short us_length;
|
||||||
ULONG qop;
|
unsigned long qop;
|
||||||
unsigned char socksreq[4]; /* room for gssapi exchange header only */
|
unsigned char socksreq[4]; /* room for gssapi exchange header only */
|
||||||
char *service = data->set.str[STRING_SOCKS5_GSSAPI_SERVICE];
|
char *service = data->set.str[STRING_SOCKS5_GSSAPI_SERVICE];
|
||||||
|
|
||||||
@ -141,7 +141,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
|
|||||||
cred_handle.dwUpper = 0;
|
cred_handle.dwUpper = 0;
|
||||||
|
|
||||||
status = s_pSecFn->AcquireCredentialsHandle(NULL,
|
status = s_pSecFn->AcquireCredentialsHandle(NULL,
|
||||||
(SECURITY_PSTR) TEXT("Kerberos"),
|
(TCHAR *) TEXT("Kerberos"),
|
||||||
SECPKG_CRED_OUTBOUND,
|
SECPKG_CRED_OUTBOUND,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
@ -160,7 +160,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
|
|||||||
/* As long as we need to keep sending some context info, and there's no */
|
/* As long as we need to keep sending some context info, and there's no */
|
||||||
/* errors, keep sending it... */
|
/* errors, keep sending it... */
|
||||||
for(;;) {
|
for(;;) {
|
||||||
LPTSTR sname;
|
TCHAR *sname;
|
||||||
#ifdef UNICODE
|
#ifdef UNICODE
|
||||||
sname = Curl_convert_UTF8_to_wchar(service_name);
|
sname = Curl_convert_UTF8_to_wchar(service_name);
|
||||||
if(!sname)
|
if(!sname)
|
||||||
|
Loading…
Reference in New Issue
Block a user