diff options
author | Brad King <brad.king@kitware.com> | 2021-02-03 16:55:06 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-02-03 16:55:06 (GMT) |
commit | 426ef61cc8d850ad6877d0598a9917ce9a4f2b20 (patch) | |
tree | 139e0e0af11012c1cd5e9c89d90305bf6d68e916 /Utilities/cmcurl/lib/socks_gssapi.c | |
parent | 0341888c006c19d0057017231ed43279d53e6034 (diff) | |
parent | 076b3219f58ca16afa52fe095019a05537ade0f3 (diff) | |
download | CMake-426ef61cc8d850ad6877d0598a9917ce9a4f2b20.zip CMake-426ef61cc8d850ad6877d0598a9917ce9a4f2b20.tar.gz CMake-426ef61cc8d850ad6877d0598a9917ce9a4f2b20.tar.bz2 |
Merge branch 'upstream-curl' into update-curl
* upstream-curl:
curl 2021-02-03 (2f33be81)
Diffstat (limited to 'Utilities/cmcurl/lib/socks_gssapi.c')
-rw-r--r-- | Utilities/cmcurl/lib/socks_gssapi.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/Utilities/cmcurl/lib/socks_gssapi.c b/Utilities/cmcurl/lib/socks_gssapi.c index a965796..3ab786d 100644 --- a/Utilities/cmcurl/lib/socks_gssapi.c +++ b/Utilities/cmcurl/lib/socks_gssapi.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2012 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 2012 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 2009, Markus Moeller, <markus_moeller@compuserve.com> * * This software is licensed as described in the file COPYING, which @@ -92,7 +92,7 @@ static int check_gss_err(struct Curl_easy *data, } gss_release_buffer(&min_stat, &status_string); } - failf(data, "GSS-API error: %s failed:\n%s", function, buf); + failf(data, "GSS-API error: %s failed: %s", function, buf); return 1; } @@ -100,9 +100,9 @@ static int check_gss_err(struct Curl_easy *data, } CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, - struct connectdata *conn) + struct Curl_easy *data) { - struct Curl_easy *data = conn->data; + struct connectdata *conn = data->conn; curl_socket_t sock = conn->sock[sockindex]; CURLcode code; ssize_t actualread; @@ -201,7 +201,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, us_length = htons((short)gss_send_token.length); memcpy(socksreq + 2, &us_length, sizeof(short)); - code = Curl_write_plain(conn, sock, (char *)socksreq, 4, &written); + code = Curl_write_plain(data, sock, (char *)socksreq, 4, &written); if(code || (4 != written)) { failf(data, "Failed to send GSS-API authentication request."); gss_release_name(&gss_status, &server); @@ -211,7 +211,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, return CURLE_COULDNT_CONNECT; } - code = Curl_write_plain(conn, sock, (char *)gss_send_token.value, + code = Curl_write_plain(data, sock, (char *)gss_send_token.value, gss_send_token.length, &written); if(code || ((ssize_t)gss_send_token.length != written)) { @@ -240,7 +240,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, * +----+------+-----+----------------+ */ - result = Curl_blockread_all(conn, sock, (char *)socksreq, 4, &actualread); + result = Curl_blockread_all(data, sock, (char *)socksreq, 4, &actualread); if(result || (actualread != 4)) { failf(data, "Failed to receive GSS-API authentication response."); gss_release_name(&gss_status, &server); @@ -279,7 +279,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, return CURLE_OUT_OF_MEMORY; } - result = Curl_blockread_all(conn, sock, (char *)gss_recv_token.value, + result = Curl_blockread_all(data, sock, (char *)gss_recv_token.value, gss_recv_token.length, &actualread); if(result || (actualread != us_length)) { @@ -408,7 +408,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, memcpy(socksreq + 2, &us_length, sizeof(short)); } - code = Curl_write_plain(conn, sock, (char *)socksreq, 4, &written); + code = Curl_write_plain(data, sock, (char *)socksreq, 4, &written); if(code || (4 != written)) { failf(data, "Failed to send GSS-API encryption request."); gss_release_buffer(&gss_status, &gss_w_token); @@ -418,7 +418,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, if(data->set.socks5_gssapi_nec) { memcpy(socksreq, &gss_enc, 1); - code = Curl_write_plain(conn, sock, socksreq, 1, &written); + code = Curl_write_plain(data, sock, socksreq, 1, &written); if(code || ( 1 != written)) { failf(data, "Failed to send GSS-API encryption type."); gss_delete_sec_context(&gss_status, &gss_context, NULL); @@ -426,7 +426,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, } } else { - code = Curl_write_plain(conn, sock, (char *)gss_w_token.value, + code = Curl_write_plain(data, sock, (char *)gss_w_token.value, gss_w_token.length, &written); if(code || ((ssize_t)gss_w_token.length != written)) { failf(data, "Failed to send GSS-API encryption type."); @@ -437,7 +437,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, gss_release_buffer(&gss_status, &gss_w_token); } - result = Curl_blockread_all(conn, sock, (char *)socksreq, 4, &actualread); + result = Curl_blockread_all(data, sock, (char *)socksreq, 4, &actualread); if(result || (actualread != 4)) { failf(data, "Failed to receive GSS-API encryption response."); gss_delete_sec_context(&gss_status, &gss_context, NULL); @@ -468,7 +468,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, gss_delete_sec_context(&gss_status, &gss_context, NULL); return CURLE_OUT_OF_MEMORY; } - result = Curl_blockread_all(conn, sock, (char *)gss_recv_token.value, + result = Curl_blockread_all(data, sock, (char *)gss_recv_token.value, gss_recv_token.length, &actualread); if(result || (actualread != us_length)) { |