g_acquire_cred.c (gss_add_cred): New GSSAPI V2 function
authorTheodore Tso <tytso@mit.edu>
Sun, 25 Feb 1996 02:33:59 +0000 (02:33 +0000)
committerTheodore Tso <tytso@mit.edu>
Sun, 25 Feb 1996 02:33:59 +0000 (02:33 +0000)
g_inquire_cred.c (gss_inquire_cred_by_mech): New GSSAPI V2 function.

g_init_sec_context.c (gss_init_sec_context): Make sure we convert the
union credential into a mechanism specific credential.

g_glue.c (__gss_get_mechanism_cred): New function for returning the
mechanism-specific credential from a union credential.

g_inquire_names.c (gss_inquire_names_for_mech):
g_oid_ops.c (gss_str_to_oid, gss_oid_to_str, ss_test_oid_set_member,
gss_add_oid_set_member, gss_create_empty_oid_set, gss_release_oid):
g_imp_sec_context.c (gss_import_sec_context):
g_exp_sec_context.c (gss_export_sec_context):
g_inquire_cred.c (gss_inquire_cred):
g_rel_oid_set.c (gss_release_oid_set):
g_rel_buffer.c (gss_release_buffer):
g_rel_name.c (gss_release_name):
g_imp_name.c (gss_import_name):
g_dsp_name.c (gss_display_name):
g_compare_name.c (gss_compare_name):
g_indicate_mechs.c (gss_indicate_mechs):
g_dsp_status.c (gss_display_status):
g_unseal.c (gss_unseal, gss_unwrap):
g_seal.c (gss_seal, gss_wrap):
g_verify.c (gss_verify, gss_verify_mic):
g_sign.c (gss_sign, gss_get_mic):
g_context_time.c (gss_context_time):
g_delete_sec_context.c (gss_delete_sec_context):
g_process_context.c (gss_process_context):
g_accept_sec_context.c (gss_accept_sec_context):
g_init_sec_context.c (gss_init_sec_context):
g_rel_cred.c (gss_release_cred):
g_acquire_cred.c (gss_acquire_cred): Added INTERFACE keyword for Windows.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7536 dc483132-0cff-0310-8789-dd5450dbe970

26 files changed:
src/lib/gssapi/mechglue/ChangeLog
src/lib/gssapi/mechglue/g_accept_sec_context.c
src/lib/gssapi/mechglue/g_acquire_cred.c
src/lib/gssapi/mechglue/g_compare_name.c
src/lib/gssapi/mechglue/g_context_time.c
src/lib/gssapi/mechglue/g_delete_sec_context.c
src/lib/gssapi/mechglue/g_dsp_name.c
src/lib/gssapi/mechglue/g_dsp_status.c
src/lib/gssapi/mechglue/g_exp_sec_context.c
src/lib/gssapi/mechglue/g_glue.c
src/lib/gssapi/mechglue/g_imp_name.c
src/lib/gssapi/mechglue/g_imp_sec_context.c
src/lib/gssapi/mechglue/g_indicate_mechs.c
src/lib/gssapi/mechglue/g_init_sec_context.c
src/lib/gssapi/mechglue/g_inquire_cred.c
src/lib/gssapi/mechglue/g_inquire_names.c
src/lib/gssapi/mechglue/g_oid_ops.c
src/lib/gssapi/mechglue/g_process_context.c
src/lib/gssapi/mechglue/g_rel_buffer.c
src/lib/gssapi/mechglue/g_rel_cred.c
src/lib/gssapi/mechglue/g_rel_name.c
src/lib/gssapi/mechglue/g_rel_oid_set.c
src/lib/gssapi/mechglue/g_sign.c
src/lib/gssapi/mechglue/g_unseal.c
src/lib/gssapi/mechglue/g_verify.c
src/lib/gssapi/mechglue/mglueP.h

index 1a9afca67fa74a5b78b0a657f707f4d66f3e6fa7..9bcb3c6e9be16af463fa0d0eb03eb7a7ff7ddf82 100644 (file)
@@ -1,5 +1,45 @@
 Sat Feb 24 16:19:30 1996  Theodore Y. Ts'o  <tytso@dcl>
 
+       * g_acquire_cred.c (gss_add_cred): New GSSAPI V2 function.
+
+       * g_inquire_cred.c (gss_inquire_cred_by_mech): New GSSAPI V2
+               function. 
+
+       * g_init_sec_context.c (gss_init_sec_context): Make sure we
+               convert the union credential into a mechanism specific
+               credential.
+
+       * g_glue.c (__gss_get_mechanism_cred): New function for returning
+               the mechanism-specific credential from a union credential.
+
+       * g_inquire_names.c (gss_inquire_names_for_mech): 
+       * g_oid_ops.c (gss_str_to_oid, gss_oid_to_str, 
+               gss_test_oid_set_member, gss_add_oid_set_member,
+               gss_create_empty_oid_set, gss_release_oid): 
+       * g_imp_sec_context.c (gss_import_sec_context): 
+       * g_exp_sec_context.c (gss_export_sec_context):
+       * g_inquire_cred.c (gss_inquire_cred): 
+       * g_rel_oid_set.c (gss_release_oid_set): 
+       * g_rel_buffer.c (gss_release_buffer): 
+       * g_rel_name.c (gss_release_name): 
+       * g_imp_name.c (gss_import_name): 
+       * g_dsp_name.c (gss_display_name): 
+       * g_compare_name.c (gss_compare_name):
+       * g_indicate_mechs.c (gss_indicate_mechs):
+       * g_dsp_status.c (gss_display_status): 
+       * g_unseal.c (gss_unseal, gss_unwrap): 
+       * g_seal.c (gss_seal, gss_wrap):
+       * g_verify.c (gss_verify, gss_verify_mic): 
+       * g_sign.c (gss_sign, gss_get_mic):
+       * g_context_time.c (gss_context_time): 
+       * g_delete_sec_context.c (gss_delete_sec_context): 
+       * g_process_context.c (gss_process_context): 
+       * g_accept_sec_context.c (gss_accept_sec_context): 
+       * g_init_sec_context.c (gss_init_sec_context): 
+       * g_rel_cred.c (gss_release_cred): 
+       * g_acquire_cred.c (gss_acquire_cred): Added INTERFACE keyword for
+               Windows.
+
        * mglueP.h:
        * g_seal.c: Add support for new V2 call gss_wrap_size_limit()
 
index 7fdc6f2212d51d2ce222e5b70a0b92a2095b5fe5..a1251a3675096c886817337dd6f401f85a717ecd 100644 (file)
@@ -32,7 +32,7 @@
 #endif
 #include <string.h>
 
-OM_uint32
+OM_uint32 INTERFACE
 gss_accept_sec_context (minor_status,
                         context_handle,
                         verifier_cred_handle,
@@ -114,21 +114,8 @@ gss_cred_id_t *            delegated_cred_handle;
      * defaults to GSS_C_NO_CREDENTIAL if there is no cred, which will
      * use the default credential.
      */
-    
     union_cred = (gss_union_cred_t) verifier_cred_handle;
-    
-    if (verifier_cred_handle != GSS_C_NO_CREDENTIAL) 
-       for (i=0; i < union_cred->count; i++) {
-           if((union_cred->mechs_array[i].length == token_mech_type->length)
-              &&
-              (memcmp(union_cred->mechs_array[i].elements,
-                      token_mech_type->elements, 
-                      token_mech_type->length) == 0)) {
-               
-               input_cred_handle = union_cred->cred_array[i];
-               break;
-           }
-       }
+    input_cred_handle = __gss_get_mechanism_cred(union_cred, token_mech_type);
     
     /*
      * now select the approprate underlying mechanism routine and
index dcc9329e8f8d32b2b8acdaf3679e4767db444eaf..99e8b0acaa5e33cd8bb11d92f4988a5411a218ba 100644 (file)
 #include <stdlib.h>
 #endif
 #include <string.h>
+#include <errno.h>
 
 #define g_OID_equal(o1,o2) \
    (((o1)->length == (o2)->length) && \
     (memcmp((o1)->elements,(o2)->elements,(int) (o1)->length) == 0))
 
-OM_uint32
+static gss_OID_set
+create_actual_mechs(creds)
+    gss_union_cred_t   creds;
+{
+    gss_OID_set        actual_mechs;
+    int                        i;
+
+    actual_mechs = (gss_OID_set) malloc(sizeof(gss_OID_set_desc));
+    if (!actual_mechs)
+       return NULL;
+
+    actual_mechs->elements = (gss_OID)
+           malloc(sizeof(gss_OID_desc) * creds->count);
+    if (!actual_mechs->elements) {
+       free(actual_mechs);
+       return NULL;
+    }
+    
+    actual_mechs->count = creds->count;
+
+    for (i=0; i < creds->count; i++) {
+       actual_mechs->elements[i].length = creds->mechs_array[i].length;
+       actual_mechs->elements[i].elements = (void *)
+           malloc(creds->mechs_array[i].length);
+       memcpy(actual_mechs->elements[i].elements,
+              creds->mechs_array[i].elements, creds->mechs_array[i].length);
+    }
+
+    return actual_mechs;
+}
+
+
+OM_uint32 INTERFACE
 gss_acquire_cred(minor_status,
                  desired_name,
                  time_req,
@@ -300,3 +333,147 @@ OM_uint32 *               time_rec;
     *output_cred_handle = (gss_cred_id_t) creds;
     return(GSS_S_COMPLETE);
 }
+
+/* V2 interface */
+OM_uint32 INTERFACE
+gss_add_cred(minor_status, input_cred_handle,
+                 desired_name, desired_mech, cred_usage,
+                 initiator_time_req, acceptor_time_req,
+                 output_cred_handle, actual_mechs, 
+                 initiator_time_rec, acceptor_time_rec)
+    OM_uint32          *minor_status;
+    gss_cred_id_t      input_cred_handle;
+    gss_name_t         desired_name;
+    gss_OID            desired_mech;
+    gss_cred_usage_t   cred_usage;
+    OM_uint32          initiator_time_req;
+    OM_uint32          acceptor_time_req;
+    gss_cred_id_t      *output_cred_handle;
+    gss_OID_set                *actual_mechs;
+    OM_uint32          *initiator_time_rec;
+    OM_uint32          *acceptor_time_rec;
+{
+    OM_uint32          status, temp_minor_status;
+    OM_uint32          time_req, time_rec;
+    gss_union_name_t   union_name;
+    gss_union_cred_t   new_union_cred, union_cred;
+    gss_name_t         internal_name;
+    gss_mechanism      mech;
+    gss_cred_id_t      cred;
+    gss_OID            new_mechs_array;
+    gss_cred_id_t *    new_cred_array;
+
+    if (input_cred_handle == GSS_C_NO_CREDENTIAL)
+       return GSS_S_NO_CRED;
+
+    union_cred = (gss_union_cred_t) input_cred_handle;
+
+    mech = __gss_get_mechanism(desired_mech);
+    if (!mech)
+       return GSS_S_BAD_MECH;
+
+    if (__gss_get_mechanism_cred(union_cred, desired_mech) !=
+       GSS_C_NO_CREDENTIAL)
+       return GSS_S_DUPLICATE_ELEMENT;
+
+    union_name = (gss_union_name_t) desired_name;
+    if (union_name->mech_type) {
+       if (!g_OID_equal(desired_mech, union_name->mech_type))
+           return GSS_S_BAD_NAMETYPE;
+       internal_name = union_name->mech_name;
+    } else {
+       if (__gss_import_internal_name(minor_status, desired_mech,
+                                      union_name, &internal_name))
+           return (GSS_S_BAD_NAME);
+    }
+
+    if (cred_usage == GSS_C_ACCEPT)
+       time_req = acceptor_time_req;
+    else if (cred_usage == GSS_C_INITIATE)
+       time_req = initiator_time_req;
+    else if (cred_usage == GSS_C_BOTH)
+       time_req = (acceptor_time_req > initiator_time_req) ?
+           acceptor_time_req : initiator_time_req;
+
+    status = mech->gss_acquire_cred(mech->context, minor_status,
+                                   internal_name, time_req,
+                                   GSS_C_NULL_OID_SET, cred_usage,
+                                   &cred, NULL, &time_rec);
+    if (status != GSS_S_COMPLETE)
+       goto errout;
+
+    new_mechs_array = (gss_OID)
+       malloc(sizeof(gss_OID_desc) * (union_cred->count+1));
+    
+    new_cred_array = (gss_cred_id_t *)
+       malloc(sizeof(gss_cred_id_t) * (union_cred->count+1));
+
+    if (!new_mechs_array || !new_cred_array) {
+       *minor_status = ENOMEM;
+       status = GSS_S_FAILURE;
+       goto errout;
+    }
+
+
+    if (acceptor_time_rec)
+       if (cred_usage == GSS_C_ACCEPT || cred_usage == GSS_C_BOTH)
+           *acceptor_time_rec = time_rec;
+    if (initiator_time_rec)
+       if (cred_usage == GSS_C_INITIATE || cred_usage == GSS_C_BOTH)
+           *initiator_time_rec = time_rec;
+
+    /*
+     * OK, expand the mechanism array in the union credentials
+     * (Look for the union label...)
+     */
+    memcpy(new_mechs_array, union_cred->mechs_array,
+          sizeof(gss_OID_desc) * union_cred->count);
+    memcpy(new_cred_array, union_cred->cred_array,
+          sizeof(gss_cred_id_t) * union_cred->count);
+    
+    new_cred_array[union_cred->count] = cred;
+    new_mechs_array[union_cred->count].length = desired_mech->length;
+    new_mechs_array[union_cred->count].elements = malloc(desired_mech->length);
+    if (!new_mechs_array[union_cred->count].elements) {
+       *minor_status = ENOMEM;
+       goto errout;
+    }
+    memcpy(new_mechs_array[union_cred->count].elements, desired_mech->elements,
+          desired_mech->length);
+
+    if (output_cred_handle == NULL) {
+       free(union_cred->mechs_array);
+       free(union_cred->cred_array);
+       new_union_cred = union_cred;
+    } else {
+       new_union_cred = malloc(sizeof(gss_union_cred_desc));
+       if (new_union_cred == NULL) {
+           *minor_status = ENOMEM;
+           goto errout;
+       }
+       *new_union_cred = *union_cred;
+       *output_cred_handle = new_union_cred;
+    }
+    new_union_cred->mechs_array = new_mechs_array;
+    new_union_cred->cred_array = new_cred_array;
+    new_union_cred->count++;
+    new_mechs_array = 0;
+    new_cred_array = 0;
+
+    if (actual_mechs)
+       *actual_mechs = create_actual_mechs(new_union_cred);
+    
+    status = GSS_S_COMPLETE;
+    
+errout:
+    if (new_mechs_array)
+       free(new_mechs_array);
+    if (new_cred_array)
+       free(new_cred_array);
+    if (!union_name->mech_type) {
+       (void) __gss_release_internal_name(&temp_minor_status,
+                                          desired_mech, &internal_name);
+    }
+
+    return(status);
+}
index 11d2cd66d0b37d464fb5058489ca3fb745f3bddd..5fb617832998e277cba455f63314fc578b450da7 100644 (file)
@@ -37,7 +37,7 @@
    (((o1)->length == (o2)->length) && \
     (memcmp((o1)->elements,(o2)->elements,(int) (o1)->length) == 0))
 
-OM_uint32
+OM_uint32 INTERFACE
 gss_compare_name (minor_status,
                   name1,
                   name2,
index 193d3906c8c87ebbd1fa75571fc745585c02d9a5..826bcb76aa1ba905404fc43e608ca15c824acfa6 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "mglueP.h"
 
-OM_uint32
+OM_uint32 INTERFACE
 gss_context_time (minor_status,
                   context_handle,
                   time_rec)
index 6d6551a62c4a19d9beeb652d8bfc1c36329424fb..1a0d6e382337c6c58c47b372ad40b3fad415a959 100644 (file)
@@ -31,7 +31,7 @@
 #include <stdlib.h>
 #endif
 
-OM_uint32
+OM_uint32 INTERFACE 
 gss_delete_sec_context (minor_status,
                         context_handle,
                         output_token)
index 86d1ec19b331ea4dfb23d443613138405c989243..a353f1e7fb8fb5979eb4a2e9e555ca9d9c79bc02 100644 (file)
@@ -33,7 +33,7 @@
 #endif
 #include <string.h>
 
-OM_uint32
+OM_uint32 INTERFACE
 gss_display_name (minor_status,
                   input_name,
                   output_name_buffer,
index c4b35755e67aa2908eea602f12fecaff66ac1e76..5f5cc37b6b4c68f8ccbb215dfcf0f6d1331b096a 100644 (file)
@@ -32,7 +32,7 @@
 #include <stdlib.h>
 #endif
 
-OM_uint32
+OM_uint32 INTERFACE
 gss_display_status (minor_status,
                     status_value,
                     status_type,
index 2d623c19d61a7f7f06930528fe3eebd28eb88661..d68a9bdff92e8b8bb06ee68a197faf670289caca 100644 (file)
@@ -32,7 +32,7 @@
 #include <stdlib.h>
 #endif
 
-OM_uint32
+OM_uint32 INTERFACE
 gss_export_sec_context(minor_status,
                        context_handle,
                        interprocess_token)
index 556d108e515bf4c62c4f79b004480a664944a793..4809a1e8d212e0d21dc010a30f3880bc21eb3422 100644 (file)
 #endif
 #include <errno.h>
 
+#define g_OID_equal(o1,o2) \
+   (((o1)->length == (o2)->length) && \
+    (memcmp((o1)->elements,(o2)->elements,(int) (o1)->length) == 0))
+
 extern gss_mechanism *__gss_mechs_array;
 
 /*
@@ -277,3 +281,26 @@ allocation_failure:
     }
     return (major_status);
 }
+
+/*
+ * Glue routine for returning the mechanism-specific credential from a
+ * external union credential.
+ */
+gss_cred_id_t
+__gss_get_mechanism_cred(union_cred, mech_type)
+    gss_union_cred_t   union_cred;
+    gss_OID            mech_type;
+{
+    int                i;
+    
+    if (union_cred == GSS_C_NO_CREDENTIAL)
+       return GSS_C_NO_CREDENTIAL;
+    
+    for (i=0; i < union_cred->count; i++) {
+       if (g_OID_equal(mech_type, &union_cred->mechs_array[i]))
+           return union_cred->cred_array[i];
+    }
+    return GSS_C_NO_CREDENTIAL;
+}
+
+    
index 27cd09256d314ff4a7f7a44fe1ef8deb79c46b94..c27fca45a4eeb742ea1ff7ad25a416e20f86eb15 100644 (file)
@@ -34,7 +34,7 @@
 #include <string.h>
 #include <errno.h>
 
-OM_uint32
+OM_uint32 INTERFACE
 gss_import_name(minor_status,
                 input_name_buffer,
                 input_name_type,
index 79a6bb2f9174ef8cf0545214e7139be305f622c2..02a3a77708a29bd45e40f861c74d3d924d9c91e9 100644 (file)
@@ -32,7 +32,7 @@
 #include <stdlib.h>
 #endif
 
-OM_uint32
+OM_uint32 INTERFACE
 gss_import_sec_context(minor_status,
                        interprocess_token,
                        context_handle)
index 01cad3f1b9a923ef67c2b8151fa233e3cb0288b0..5e0aae97cedc64fa9b36cc54d1015ffbd586b312 100644 (file)
@@ -37,7 +37,7 @@ extern gss_mechanism *__gss_mechs_array;
 static gss_OID_set_desc        supported_mechs_desc; 
 static gss_OID_set supported_mechs = NULL;
 
-OM_uint32
+OM_uint32 INTERFACE
 gss_indicate_mechs (minor_status,
                     mech_set)
 
index 2d54436bfea35168fb758692f08d54f71b491750..c22cf949c84a0f8a8f3d346e6f69f0979e16de3b 100644 (file)
@@ -36,7 +36,7 @@
    (((o1)->length == (o2)->length) && \
     (memcmp((o1)->elements,(o2)->elements,(int) (o1)->length) == 0))
 
-OM_uint32
+OM_uint32 INTERFACE
 gss_init_sec_context (minor_status,
                       claimant_cred_handle,
                       context_handle,
@@ -68,10 +68,12 @@ OM_uint32 FAR *             time_rec;
 {
     OM_uint32          status, temp_status, temp_minor_status;
     gss_union_name_t   union_name;
+    gss_union_cred_t   union_cred;
     gss_name_t         internal_name;
     gss_union_ctx_id_t union_ctx_id;
     gss_OID            mech_type = (gss_OID) req_mech_type;
     gss_mechanism      mech;
+    gss_cred_id_t      input_cred_handle;
 
     gss_initialize();
 
@@ -145,6 +147,14 @@ OM_uint32 FAR *            time_rec;
     } else
        union_ctx_id = *context_handle;
     
+    /* 
+     * get the appropriate cred handle from the union cred struct.
+     * defaults to GSS_C_NO_CREDENTIAL if there is no cred, which will
+     * use the default credential.
+     */
+    union_cred = (gss_union_cred_t) claimant_cred_handle;
+    input_cred_handle = __gss_get_mechanism_cred(union_cred, mech_type);
+    
     /*
      * now call the approprate underlying mechanism routine 
      */
@@ -153,7 +163,7 @@ OM_uint32 FAR *             time_rec;
        status = mech->gss_init_sec_context(
                                            mech->context,
                                            minor_status,
-                                           claimant_cred_handle,
+                                           input_cred_handle,
                                            &union_ctx_id->internal_ctx_id,
                                            internal_name,
                                            mech_type,
index cbc1997b04960ddcbb1e4bc480ba07977da33855..e564661fa4ea078c7c8388a4b81aa8416c77df59 100644 (file)
@@ -32,7 +32,7 @@
 #endif
 #include <string.h>
 
-OM_uint32
+OM_uint32 INTERFACE
 gss_inquire_cred(minor_status,
                  cred_handle,
                  name,
@@ -48,7 +48,7 @@ int *                 cred_usage;
 gss_OID_set *          mechanisms;
 
 {
-    OM_uint32          status, elapsed_time, temp_minor_status;
+    OM_uint32          elapsed_time, temp_minor_status;
     gss_union_cred_t   union_cred;
     int                        i;
     
@@ -126,3 +126,34 @@ gss_OID_set *              mechanisms;
     
     return(GSS_S_COMPLETE);
 }
+
+OM_uint32 INTERFACE
+gss_inquire_cred_by_mech(minor_status, cred_handle, mech_type, name,
+                        initiator_lifetime, acceptor_lifetime, cred_usage)
+    OM_uint32          *minor_status;
+    gss_cred_id_t      cred_handle;
+    gss_OID            mech_type;
+    gss_name_t         *name;
+    OM_uint32          *initiator_lifetime;
+    OM_uint32          *acceptor_lifetime;
+    gss_cred_usage_t *cred_usage;
+{
+    gss_union_cred_t   union_cred;
+    gss_cred_id_t      mech_cred;
+    gss_mechanism      mech;
+
+    mech = __gss_get_mechanism (mech_type);
+    if (!mech)
+       return (GSS_S_BAD_MECH);
+    if (!mech->gss_inquire_cred_by_mech)
+       return (GSS_S_BAD_BINDINGS);
+     
+    union_cred = (gss_union_cred_t) cred_handle;
+    mech_cred = __gss_get_mechanism_cred(union_cred, mech_type);
+
+    return (mech->gss_inquire_cred_by_mech(mech->context, minor_status,
+                                          mech_cred, mech_type,
+                                          name, initiator_lifetime,
+                                          acceptor_lifetime, cred_usage));
+}
+
index 0cd5e49a9c9b456898fdf7e82243b8b43795f9f7..89330e43f88e8ab1f9591f5f054ba6ed10b3894f 100644 (file)
 #include "mglueP.h"
 
 /* Last argument new for V2 */
-OM_uint32 gss_inquire_names_for_mech(
-           minor_status,
-           mechanism,
-           name_types)
+OM_uint32 INTERFACE
+gss_inquire_names_for_mech(minor_status, mechanism, name_types)
 
 OM_uint32 *    minor_status;
 gss_OID        mechanism;
index ee7cac70cb8f76419ae24aa34defe33d69fa9f7a..38529858411975b5289ca3f6be8110072a976ef1 100644 (file)
@@ -31,7 +31,7 @@
 
 extern gss_mechanism *__gss_mechs_array;
 
-OM_uint32
+OM_uint32 INTERFACE
 gss_release_oid(minor_status, oid)
     OM_uint32  *minor_status;
     gss_OID    *oid;
@@ -60,7 +60,7 @@ gss_release_oid(minor_status, oid)
     return generic_gss_release_oid(minor_status, oid);
 }
 
-OM_uint32
+OM_uint32 INTERFACE
 gss_create_empty_oid_set(minor_status, oid_set)
     OM_uint32  *minor_status;
     gss_OID_set        *oid_set;
@@ -68,7 +68,7 @@ gss_create_empty_oid_set(minor_status, oid_set)
        return generic_gss_create_empty_oid_set(minor_status, oid_set);
 }
 
-OM_uint32
+OM_uint32 INTERFACE
 gss_add_oid_set_member(minor_status, member_oid, oid_set)
     OM_uint32  *minor_status;
     gss_OID    member_oid;
@@ -77,7 +77,7 @@ gss_add_oid_set_member(minor_status, member_oid, oid_set)
      return generic_gss_add_oid_set_member(minor_status, member_oid, oid_set);
 }
 
-OM_uint32
+OM_uint32 INTERFACE
 gss_test_oid_set_member(minor_status, member, set, present)
     OM_uint32  *minor_status;
     gss_OID    member;
@@ -87,7 +87,7 @@ gss_test_oid_set_member(minor_status, member, set, present)
     return generic_gss_test_oid_set_member(minor_status, member, set, present);
 }
 
-OM_uint32
+OM_uint32 INTERFACE
 gss_oid_to_str(minor_status, oid, oid_str)
     OM_uint32          *minor_status;
     gss_OID            oid;
@@ -96,7 +96,7 @@ gss_oid_to_str(minor_status, oid, oid_str)
     return generic_gss_oid_to_str(minor_status, oid, oid_str);
 }
 
-OM_uint32
+OM_uint32 INTERFACE
 gss_str_to_oid(minor_status, oid_str, oid)
     OM_uint32          *minor_status;
     gss_buffer_t       oid_str;
index 9c94bda327ac7fc156341bb32fe6ee95400862e8..467dbbcd26e6633f1c01f4e90c19e5c77ce8b630 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "mglueP.h"
 
-OM_uint32
+OM_uint32 INTERFACE
 gss_process_context_token (minor_status,
                            context_handle,
                            token_buffer)
index c13bc72e2b25ae435fd07b888ea890e9a00c2445..f634c805207dcc49365549b1cd03bc7a2ae70d22 100644 (file)
@@ -31,7 +31,7 @@
 #include <stdlib.h>
 #endif
 
-OM_uint32
+OM_uint32 INTERFACE
 gss_release_buffer (minor_status,
                    buffer)
 
index ea11a08aad78da8ec92dff2420ed6ff07fa80e08..50be113f1d9e8c6d0aa4b98939d1e13be0cd3cc1 100644 (file)
@@ -31,7 +31,7 @@
 #include <stdlib.h>
 #endif
 
-OM_uint32
+OM_uint32 INTERFACE
 gss_release_cred(minor_status,
                  cred_handle)
 
index 1010304ad1855e1dbb55ddb4ccdb796f6fcfdd95..64228d6881801bd3711afc8a5c633d96881a469c 100644 (file)
@@ -32,7 +32,7 @@
 #endif
 #include <string.h>
 
-OM_uint32
+OM_uint32 INTERFACE
 gss_release_name (minor_status,
                  input_name)
 
index caa1e13ac25be2d12a7aa2428cc1e987935925e6..405a2c48dfbeb2de2942aef71af0a4f49f0acde7 100644 (file)
@@ -31,7 +31,7 @@
 #include <stdlib.h>
 #endif
 
-OM_uint32
+OM_uint32 INTERFACE
 gss_release_oid_set (minor_status,
                     set)
 
index 19e386a5b4c157737835cc821b9a2aaf8172fdf9..5345f00be91695e2b8886a2de470676fc8c1db50 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "mglueP.h"
 
-OM_uint32
+OM_uint32 INTERFACE
 gss_sign (minor_status,
           context_handle,
           qop_req,
@@ -77,7 +77,7 @@ gss_buffer_t          msg_token;
     return(GSS_S_NO_CONTEXT);
 }
 
-OM_uint32
+OM_uint32 INTERFACE
 gss_get_mic (minor_status,
           context_handle,
           qop_req,
index f3f77c62176fddde37ae8dff9ba3331caa851695..db7b5d923429afe56a469a788a5f66ecbea02481 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "mglueP.h"
 
-OM_uint32
+OM_uint32 INTERFACE
 gss_unseal (minor_status,
             context_handle,
             input_message_buffer,
@@ -80,7 +80,7 @@ int *                 qop_state;
     return(GSS_S_NO_CONTEXT);
 }
 
-OM_uint32
+OM_uint32 INTERFACE
 gss_unwrap (minor_status,
             context_handle,
             input_message_buffer,
index d7ca764021df9ff45008f0d84353c52d343a7adc..c2b02a5ebba5e6a84d9ec58c2b4b94b9ea583a35 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "mglueP.h"
 
-OM_uint32
+OM_uint32 INTERFACE
 gss_verify (minor_status,
             context_handle,
             message_buffer,
@@ -77,7 +77,7 @@ int *                 qop_state;
     return(GSS_S_NO_CONTEXT);
 }
 
-OM_uint32
+OM_uint32 INTERFACE
 gss_verify_mic (minor_status,
             context_handle,
             message_buffer,
index 0abc81cf2773a5bdcfcb5dfb7b6395e16556cb79..bd0fe68a585dd7caab05dcc133ada8a850a021a8 100644 (file)
@@ -359,6 +359,10 @@ PROTOTYPE((OM_uint32 *,            /* minor_status */
           gss_name_t,          /* internal_name */
           gss_name_t *         /* external_name */
           ));
+gss_cred_id_t __gss_get_mechanism_cred
+PROTOTYPE((gss_union_cred_t,   /* union_cred */
+          gss_OID              /* mech_type */
+          ));
 
 OM_uint32 generic_gss_release_oid
 PROTOTYPE( (OM_uint32 *,       /* minor_status */