]> granicus.if.org Git - curl/commitdiff
gssapi.c: Simplified the function.
authorJulien Chaffraix <julien.chaffraix@gmail.com>
Fri, 10 Jun 2011 15:26:34 +0000 (08:26 -0700)
committerJulien Chaffraix <julien.chaffraix@gmail.com>
Tue, 12 Jul 2011 14:06:26 +0000 (07:06 -0700)
Removed the parameters that were common to all our invocation.

lib/gssapi.c
lib/gssapi.h
lib/http_negotiate.c
lib/krb5.c
lib/socks_gssapi.c

index dc777c7107069075931c052570b2825825cf232f..8911f5f32ed8bf8668b164da3eb175b4384873d0 100644 (file)
 
 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 */);
 }
index c2a07977593b3df3a40bcd53eef4d4f585026ff0..c5b58db589fc18c6aa1639daddfac71b4f8fbda8 100644 (file)
 
 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);
index 075a520623b34c9982b00f7c64a903588e4ff0f2..e4a8ff2593af23e16c6ba5aabcd47f40b86c842f 100644 (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);
index 9b67524d2d461e1704180e914a62277b27a3b15d..74a6b572b67d7d3d6bc34c85b0ffd7b9de75d2a1 100644 (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) {
index e91b572e32a9f36fe206111cba0ded01d31cf0ef..8af26c26a69533b2f809e4ae2a2d645ebc98f80f 100644 (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);