1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 16:18:48 -05:00

http_negotiate_sspi: Tidy up to remove the get_gss_name() function

Due to the reduction of code in commit 3b924b29 of get_gss_name() the
function isn't necessary anymore.
This commit is contained in:
Steve Holme 2014-08-09 18:00:01 +01:00
parent 72945b856e
commit 343befa44b

View File

@ -42,25 +42,6 @@
/* The last #include file should be: */ /* The last #include file should be: */
#include "memdebug.h" #include "memdebug.h"
static int
get_gss_name(struct connectdata *conn, bool proxy,
struct negotiatedata *neg_ctx)
{
const char* service = "HTTP";
if(proxy && !conn->proxy.name)
/* proxy auth requested but no given proxy name, error out! */
return -1;
neg_ctx->server_name = Curl_sasl_build_spn(service,
proxy ? conn->proxy.name :
conn->host.name);
if(!neg_ctx->server_name)
return -1;
return 0;
}
/* returning zero (0) means success, everything else is treated as "failure" /* returning zero (0) means success, everything else is treated as "failure"
with no care exactly what the failure was */ with no care exactly what the failure was */
int Curl_input_negotiate(struct connectdata *conn, bool proxy, int Curl_input_negotiate(struct connectdata *conn, bool proxy,
@ -111,9 +92,16 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy,
} }
if(!neg_ctx->server_name) { if(!neg_ctx->server_name) {
ret = get_gss_name(conn, proxy, neg_ctx); /* Check proxy auth requested but no given proxy name */
if(ret) if(proxy && !conn->proxy.name)
return ret; return -1;
/* Generate our SPN */
neg_ctx->server_name = Curl_sasl_build_spn("HTTP",
proxy ? conn->proxy.name :
conn->host.name);
if(!neg_ctx->server_name)
return -1;
} }
if(!neg_ctx->output_token) { if(!neg_ctx->output_token) {