aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2014-08-09 18:00:01 +0100
committerSteve Holme <steve_holme@hotmail.com>2014-08-09 20:43:46 +0100
commit343befa44b543bfa5caba1690af2c53c9c15dc05 (patch)
treee2ba0053f5790038740e961ecfebdfacb4d28486
parent72945b856e3cf9c3e91c902d3dd8d9412ebeec2e (diff)
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.
-rw-r--r--lib/http_negotiate_sspi.c32
1 files changed, 10 insertions, 22 deletions
diff --git a/lib/http_negotiate_sspi.c b/lib/http_negotiate_sspi.c
index a986b164b..61581f1f9 100644
--- a/lib/http_negotiate_sspi.c
+++ b/lib/http_negotiate_sspi.c
@@ -42,25 +42,6 @@
/* The last #include file should be: */
#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"
with no care exactly what the failure was */
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) {
- ret = get_gss_name(conn, proxy, neg_ctx);
- if(ret)
- return ret;
+ /* Check proxy auth requested but no given proxy name */
+ if(proxy && !conn->proxy.name)
+ 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) {