spnego: Renamed the context's SPN variable
To be consistent with the Kerberos 5 context and other authentication code.
This commit is contained in:
Родитель
9173dc0682
Коммит
2aaa63b555
|
@ -464,7 +464,7 @@ struct negotiatedata {
|
|||
#ifdef HAVE_GSSAPI
|
||||
OM_uint32 status;
|
||||
gss_ctx_id_t context;
|
||||
gss_name_t server_name;
|
||||
gss_name_t spn;
|
||||
gss_buffer_desc output_token;
|
||||
#else
|
||||
#ifdef USE_WINDOWS_SSPI
|
||||
|
@ -473,7 +473,7 @@ struct negotiatedata {
|
|||
CtxtHandle *context;
|
||||
SEC_WINNT_AUTH_IDENTITY identity;
|
||||
SEC_WINNT_AUTH_IDENTITY *p_identity;
|
||||
TCHAR *server_name;
|
||||
TCHAR *spn;
|
||||
size_t token_max;
|
||||
BYTE *output_token;
|
||||
size_t output_token_length;
|
||||
|
|
|
@ -88,7 +88,7 @@ CURLcode Curl_auth_decode_spnego_message(struct SessionHandle *data,
|
|||
}
|
||||
|
||||
/* Generate our SPN */
|
||||
if(!nego->server_name) {
|
||||
if(!nego->spn) {
|
||||
char *spn = Curl_auth_build_gssapi_spn(service, host);
|
||||
if(!spn)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
|
@ -100,7 +100,7 @@ CURLcode Curl_auth_decode_spnego_message(struct SessionHandle *data,
|
|||
/* Import the SPN */
|
||||
major_status = gss_import_name(&minor_status, &spn_token,
|
||||
GSS_C_NT_HOSTBASED_SERVICE,
|
||||
&nego->server_name);
|
||||
&nego->spn);
|
||||
if(GSS_ERROR(major_status)) {
|
||||
Curl_gss_log_error(data, "gss_import_name() failed: ",
|
||||
major_status, minor_status);
|
||||
|
@ -137,7 +137,7 @@ CURLcode Curl_auth_decode_spnego_message(struct SessionHandle *data,
|
|||
major_status = Curl_gss_init_sec_context(data,
|
||||
&minor_status,
|
||||
&nego->context,
|
||||
nego->server_name,
|
||||
nego->spn,
|
||||
&Curl_spnego_mech_oid,
|
||||
GSS_C_NO_CHANNEL_BINDINGS,
|
||||
&input_token,
|
||||
|
@ -246,9 +246,9 @@ void Curl_auth_spnego_cleanup(struct negotiatedata* nego)
|
|||
}
|
||||
|
||||
/* Free the SPN */
|
||||
if(nego->server_name != GSS_C_NO_NAME) {
|
||||
gss_release_name(&minor_status, &nego->server_name);
|
||||
nego->server_name = GSS_C_NO_NAME;
|
||||
if(nego->spn != GSS_C_NO_NAME) {
|
||||
gss_release_name(&minor_status, &nego->spn);
|
||||
nego->spn = GSS_C_NO_NAME;
|
||||
}
|
||||
|
||||
/* Reset any variables */
|
||||
|
|
|
@ -89,9 +89,9 @@ CURLcode Curl_auth_decode_spnego_message(struct SessionHandle *data,
|
|||
}
|
||||
|
||||
/* Generate our SPN */
|
||||
if(!nego->server_name) {
|
||||
nego->server_name = Curl_auth_build_spn(service, host);
|
||||
if(!nego->server_name)
|
||||
if(!nego->spn) {
|
||||
nego->spn = Curl_auth_build_spn(service, host);
|
||||
if(!nego->spn)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
|
@ -189,7 +189,7 @@ CURLcode Curl_auth_decode_spnego_message(struct SessionHandle *data,
|
|||
nego->status = s_pSecFn->InitializeSecurityContext(nego->credentials,
|
||||
chlg ? nego->context :
|
||||
NULL,
|
||||
nego->server_name,
|
||||
nego->spn,
|
||||
ISC_REQ_CONFIDENTIALITY,
|
||||
0, SECURITY_NATIVE_DREP,
|
||||
chlg ? &chlg_desc : NULL,
|
||||
|
@ -287,7 +287,7 @@ void Curl_auth_spnego_cleanup(struct negotiatedata* nego)
|
|||
nego->p_identity = NULL;
|
||||
|
||||
/* Free the SPN and output token */
|
||||
Curl_safefree(nego->server_name);
|
||||
Curl_safefree(nego->spn);
|
||||
Curl_safefree(nego->output_token);
|
||||
|
||||
/* Reset any variables */
|
||||
|
|
Загрузка…
Ссылка в новой задаче