1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

gssapi.c: Simplified the function.

Removed the parameters that were common to all our invocation.
This commit is contained in:
Julien Chaffraix 2011-06-10 08:26:34 -07:00
parent 20485a4885
commit 2af0287856
5 changed files with 15 additions and 45 deletions

View File

@ -24,30 +24,25 @@
OM_uint32 Curl_gss_init_sec_context(
OM_uint32 * minor_status,
gss_cred_id_t cred_handle,
gss_ctx_id_t * context,
gss_name_t target_name,
gss_OID mech_type, /* needed? */
OM_uint32 req_flags, /* TBR. */
OM_uint32 time_req,
gss_channel_bindings_t input_chan_bindings,
gss_buffer_t input_token,
gss_OID * actual_mech_type,
gss_buffer_t output_token,
OM_uint32 * ret_flags,
OM_uint32 * time_rec)
OM_uint32 * ret_flags)
{
return gss_init_sec_context(minor_status,
cred_handle,
GSS_C_NO_CREDENTIAL, /* cred_handle */
context,
target_name,
mech_type,
req_flags,
time_req,
GSS_C_NO_OID, /* mech_type */
/* req_flags */
GSS_C_MUTUAL_FLAG | GSS_C_REPLAY_FLAG,
0, /* time_req */
input_chan_bindings,
input_token,
actual_mech_type,
NULL, /* actual_mech_type */
output_token,
ret_flags,
time_rec);
NULL /* time_rec */);
}

View File

@ -39,15 +39,9 @@
OM_uint32 Curl_gss_init_sec_context(
OM_uint32 * minor_status,
gss_cred_id_t cred_handle,
gss_ctx_id_t * context,
gss_name_t target_name,
gss_OID, /* mech_type (used to be const) */
OM_uint32, /* req_flags */
OM_uint32, /* time_req */
gss_channel_bindings_t, /* input_chan_bindings */
gss_buffer_t, /* input_token */
gss_OID *, /* actual_mech_type */
gss_buffer_t, /* output_token */
OM_uint32 *, /* ret_flags */
OM_uint32 *); /* time_rec */
gss_channel_bindings_t input_chan_bindings,
gss_buffer_t input_token,
gss_buffer_t output_token,
OM_uint32 * ret_flags);

View File

@ -240,18 +240,11 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy,
}
major_status = Curl_gss_init_sec_context(&minor_status,
GSS_C_NO_CREDENTIAL,
&neg_ctx->context,
neg_ctx->server_name,
GSS_C_NO_OID,
GSS_C_MUTUAL_FLAG
| GSS_C_REPLAY_FLAG,
0,
GSS_C_NO_CHANNEL_BINDINGS,
&input_token,
NULL,
&output_token,
NULL,
NULL);
if(input_token.length > 0)
gss_release_buffer(&minor_status2, &input_token);

View File

@ -232,17 +232,11 @@ krb5_auth(void *app_data, struct connectdata *conn)
gss_release_buffer(&min, &output_buffer);
ret = AUTH_OK;
maj = Curl_gss_init_sec_context(&min,
GSS_C_NO_CREDENTIAL,
context,
gssname,
GSS_C_NO_OID,
GSS_C_MUTUAL_FLAG | GSS_C_REPLAY_FLAG,
0,
&chan,
gssresp,
NULL,
&output_buffer,
NULL,
NULL);
if(gssresp) {

View File

@ -185,18 +185,12 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
/* errors, keep sending it... */
for(;;) {
gss_major_status = Curl_gss_init_sec_context(&gss_minor_status,
GSS_C_NO_CREDENTIAL,
&gss_context, server,
GSS_C_NULL_OID,
GSS_C_MUTUAL_FLAG |
GSS_C_REPLAY_FLAG,
0,
&gss_context,
server,
NULL,
gss_token,
NULL,
&gss_send_token,
&gss_ret_flags,
NULL);
&gss_ret_flags);
if(gss_token != GSS_C_NO_BUFFER)
gss_release_buffer(&gss_status, &gss_recv_token);