Loading lib/curl_ntlm_msgs.c +5 −5 Original line number Diff line number Diff line Loading @@ -355,7 +355,7 @@ void Curl_ntlm_sspi_cleanup(struct ntlmdata *ntlm) ntlm->credentials = NULL; } ntlm->max_token_length = 0; ntlm->token_max = 0; Curl_safefree(ntlm->output_token); Curl_sspi_free_identity(ntlm->p_identity); Loading Loading @@ -433,13 +433,13 @@ CURLcode Curl_ntlm_create_type1_message(const char *userp, if(status != SEC_E_OK) return CURLE_NOT_BUILT_IN; ntlm->max_token_length = SecurityPackage->cbMaxToken; ntlm->token_max = SecurityPackage->cbMaxToken; /* Release the package buffer as it is not required anymore */ s_pSecFn->FreeContextBuffer(SecurityPackage); /* Allocate our output buffer */ ntlm->output_token = malloc(ntlm->max_token_length); ntlm->output_token = malloc(ntlm->token_max); if(!ntlm->output_token) return CURLE_OUT_OF_MEMORY; Loading Loading @@ -487,7 +487,7 @@ CURLcode Curl_ntlm_create_type1_message(const char *userp, type_1_desc.pBuffers = &type_1_buf; type_1_buf.BufferType = SECBUFFER_TOKEN; type_1_buf.pvBuffer = ntlm->output_token; type_1_buf.cbBuffer = curlx_uztoul(ntlm->max_token_length); type_1_buf.cbBuffer = curlx_uztoul(ntlm->token_max); /* Generate our type-1 message */ status = s_pSecFn->InitializeSecurityContext(ntlm->credentials, NULL, Loading Loading @@ -666,7 +666,7 @@ CURLcode Curl_ntlm_create_type3_message(struct SessionHandle *data, type_3_desc.pBuffers = &type_3_buf; type_3_buf.BufferType = SECBUFFER_TOKEN; type_3_buf.pvBuffer = ntlm->output_token; type_3_buf.cbBuffer = curlx_uztoul(ntlm->max_token_length); type_3_buf.cbBuffer = curlx_uztoul(ntlm->token_max); /* Generate our type-3 message */ status = s_pSecFn->InitializeSecurityContext(ntlm->credentials, Loading lib/http_negotiate_sspi.c +4 −4 Original line number Diff line number Diff line Loading @@ -113,8 +113,8 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy, /* Allocate input and output buffers according to the max token size as indicated by the security package */ neg_ctx->max_token_length = SecurityPackage->cbMaxToken; neg_ctx->output_token = malloc(neg_ctx->max_token_length); neg_ctx->token_max = SecurityPackage->cbMaxToken; neg_ctx->output_token = malloc(neg_ctx->token_max); s_pSecFn->FreeContextBuffer(SecurityPackage); } Loading Loading @@ -176,7 +176,7 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy, out_buff_desc.pBuffers = &out_sec_buff; out_sec_buff.BufferType = SECBUFFER_TOKEN; out_sec_buff.pvBuffer = neg_ctx->output_token; out_sec_buff.cbBuffer = curlx_uztoul(neg_ctx->max_token_length); out_sec_buff.cbBuffer = curlx_uztoul(neg_ctx->token_max); /* Setup the "input" security buffer if present */ if(input_token) { Loading Loading @@ -270,7 +270,7 @@ static void cleanup(struct negotiatedata *neg_ctx) neg_ctx->credentials = NULL; } neg_ctx->max_token_length = 0; neg_ctx->token_max = 0; Curl_safefree(neg_ctx->output_token); Curl_safefree(neg_ctx->server_name); Loading lib/urldata.h +3 −3 Original line number Diff line number Diff line Loading @@ -440,7 +440,7 @@ struct ntlmdata { CtxtHandle *context; SEC_WINNT_AUTH_IDENTITY identity; SEC_WINNT_AUTH_IDENTITY *p_identity; size_t max_token_length; size_t token_max; BYTE *output_token; BYTE *input_token; size_t input_token_len; Loading @@ -466,12 +466,12 @@ struct negotiatedata { #else #ifdef USE_WINDOWS_SSPI DWORD status; CtxtHandle *context; CredHandle *credentials; CtxtHandle *context; SEC_WINNT_AUTH_IDENTITY identity; SEC_WINNT_AUTH_IDENTITY *p_identity; TCHAR *server_name; size_t max_token_length; size_t token_max; BYTE *output_token; size_t output_token_length; #endif Loading Loading
lib/curl_ntlm_msgs.c +5 −5 Original line number Diff line number Diff line Loading @@ -355,7 +355,7 @@ void Curl_ntlm_sspi_cleanup(struct ntlmdata *ntlm) ntlm->credentials = NULL; } ntlm->max_token_length = 0; ntlm->token_max = 0; Curl_safefree(ntlm->output_token); Curl_sspi_free_identity(ntlm->p_identity); Loading Loading @@ -433,13 +433,13 @@ CURLcode Curl_ntlm_create_type1_message(const char *userp, if(status != SEC_E_OK) return CURLE_NOT_BUILT_IN; ntlm->max_token_length = SecurityPackage->cbMaxToken; ntlm->token_max = SecurityPackage->cbMaxToken; /* Release the package buffer as it is not required anymore */ s_pSecFn->FreeContextBuffer(SecurityPackage); /* Allocate our output buffer */ ntlm->output_token = malloc(ntlm->max_token_length); ntlm->output_token = malloc(ntlm->token_max); if(!ntlm->output_token) return CURLE_OUT_OF_MEMORY; Loading Loading @@ -487,7 +487,7 @@ CURLcode Curl_ntlm_create_type1_message(const char *userp, type_1_desc.pBuffers = &type_1_buf; type_1_buf.BufferType = SECBUFFER_TOKEN; type_1_buf.pvBuffer = ntlm->output_token; type_1_buf.cbBuffer = curlx_uztoul(ntlm->max_token_length); type_1_buf.cbBuffer = curlx_uztoul(ntlm->token_max); /* Generate our type-1 message */ status = s_pSecFn->InitializeSecurityContext(ntlm->credentials, NULL, Loading Loading @@ -666,7 +666,7 @@ CURLcode Curl_ntlm_create_type3_message(struct SessionHandle *data, type_3_desc.pBuffers = &type_3_buf; type_3_buf.BufferType = SECBUFFER_TOKEN; type_3_buf.pvBuffer = ntlm->output_token; type_3_buf.cbBuffer = curlx_uztoul(ntlm->max_token_length); type_3_buf.cbBuffer = curlx_uztoul(ntlm->token_max); /* Generate our type-3 message */ status = s_pSecFn->InitializeSecurityContext(ntlm->credentials, Loading
lib/http_negotiate_sspi.c +4 −4 Original line number Diff line number Diff line Loading @@ -113,8 +113,8 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy, /* Allocate input and output buffers according to the max token size as indicated by the security package */ neg_ctx->max_token_length = SecurityPackage->cbMaxToken; neg_ctx->output_token = malloc(neg_ctx->max_token_length); neg_ctx->token_max = SecurityPackage->cbMaxToken; neg_ctx->output_token = malloc(neg_ctx->token_max); s_pSecFn->FreeContextBuffer(SecurityPackage); } Loading Loading @@ -176,7 +176,7 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy, out_buff_desc.pBuffers = &out_sec_buff; out_sec_buff.BufferType = SECBUFFER_TOKEN; out_sec_buff.pvBuffer = neg_ctx->output_token; out_sec_buff.cbBuffer = curlx_uztoul(neg_ctx->max_token_length); out_sec_buff.cbBuffer = curlx_uztoul(neg_ctx->token_max); /* Setup the "input" security buffer if present */ if(input_token) { Loading Loading @@ -270,7 +270,7 @@ static void cleanup(struct negotiatedata *neg_ctx) neg_ctx->credentials = NULL; } neg_ctx->max_token_length = 0; neg_ctx->token_max = 0; Curl_safefree(neg_ctx->output_token); Curl_safefree(neg_ctx->server_name); Loading
lib/urldata.h +3 −3 Original line number Diff line number Diff line Loading @@ -440,7 +440,7 @@ struct ntlmdata { CtxtHandle *context; SEC_WINNT_AUTH_IDENTITY identity; SEC_WINNT_AUTH_IDENTITY *p_identity; size_t max_token_length; size_t token_max; BYTE *output_token; BYTE *input_token; size_t input_token_len; Loading @@ -466,12 +466,12 @@ struct negotiatedata { #else #ifdef USE_WINDOWS_SSPI DWORD status; CtxtHandle *context; CredHandle *credentials; CtxtHandle *context; SEC_WINNT_AUTH_IDENTITY identity; SEC_WINNT_AUTH_IDENTITY *p_identity; TCHAR *server_name; size_t max_token_length; size_t token_max; BYTE *output_token; size_t output_token_length; #endif Loading