Lines Matching defs:data
49 static int check_sspi_err(struct Curl_easy *data,
58 failf(data, "SSPI error: %s failed: %s", function,
67 struct Curl_easy *data)
91 const char *service = data->set.str[STRING_PROXY_SERVICE_NAME] ?
92 data->set.str[STRING_PROXY_SERVICE_NAME] : "rcmd";
152 if(check_sspi_err(data, status, "AcquireCredentialsHandle")) {
153 failf(data, "Failed to acquire credentials.");
194 if(check_sspi_err(data, status, "InitializeSecurityContext")) {
200 failf(data, "Failed to initialise security context.");
210 written = Curl_conn_cf_send(cf->next, data, (char *)socksreq, 4, &code);
212 failf(data, "Failed to send SSPI authentication request.");
223 written = Curl_conn_cf_send(cf->next, data,
227 failf(data, "Failed to send SSPI authentication token.");
265 result = Curl_blockread_all(cf, data, (char *)socksreq, 4, &actualread);
267 failf(data, "Failed to receive SSPI authentication response.");
276 failf(data, "User was rejected by the SOCKS5 server (%u %u).",
285 failf(data, "Invalid SSPI authentication response type (%u %u).",
305 result = Curl_blockread_all(cf, data, (char *)sspi_recv_token.pvBuffer,
309 failf(data, "Failed to receive SSPI authentication token.");
328 if(check_sspi_err(data, status, "QueryCredentialAttributes")) {
331 failf(data, "Failed to determine user name.");
337 infof(data, "SOCKS5 server authenticated user %s with GSS-API.",
348 gss_enc = 0; /* no data protection */
356 infof(data, "SOCKS5 server supports GSS-API %s data protection.",
358 /* force to no data protection, avoid encryption/decryption for now */
391 if(data->set.socks5_gssapi_nec) {
399 if(check_sspi_err(data, status, "QueryContextAttributes")) {
401 failf(data, "Failed to query security context attributes.");
436 if(check_sspi_err(data, status, "EncryptMessage")) {
441 failf(data, "Failed to query security context attributes.");
479 written = Curl_conn_cf_send(cf->next, data, (char *)socksreq, 4, &code);
481 failf(data, "Failed to send SSPI encryption request.");
488 if(data->set.socks5_gssapi_nec) {
490 written = Curl_conn_cf_send(cf->next, data, (char *)socksreq, 1, &code);
492 failf(data, "Failed to send SSPI encryption type.");
498 written = Curl_conn_cf_send(cf->next, data,
502 failf(data, "Failed to send SSPI encryption type.");
512 result = Curl_blockread_all(cf, data, (char *)socksreq, 4, &actualread);
514 failf(data, "Failed to receive SSPI encryption response.");
521 failf(data, "User was rejected by the SOCKS5 server (%u %u).",
528 failf(data, "Invalid SSPI encryption response type (%u %u).",
544 result = Curl_blockread_all(cf, data, (char *)sspi_w_token[0].pvBuffer,
548 failf(data, "Failed to receive SSPI encryption type.");
555 if(!data->set.socks5_gssapi_nec) {
567 if(check_sspi_err(data, status, "DecryptMessage")) {
573 failf(data, "Failed to query security context attributes.");
578 failf(data, "Invalid SSPI encryption response length (%lu).",
594 failf(data, "Invalid SSPI encryption response length (%lu).",
605 infof(data, "SOCKS5 access with%s protection granted.",
606 (socksreq[0] == 0)?"out GSS-API data":