From 4b49205ea6d6418c84c5558d6d25be10b46e10fe Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Sun, 25 Feb 1996 02:33:59 +0000 Subject: [PATCH] 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, 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 --- src/lib/gssapi/mechglue/ChangeLog | 40 ++++ .../gssapi/mechglue/g_accept_sec_context.c | 17 +- src/lib/gssapi/mechglue/g_acquire_cred.c | 179 +++++++++++++++++- src/lib/gssapi/mechglue/g_compare_name.c | 2 +- src/lib/gssapi/mechglue/g_context_time.c | 2 +- .../gssapi/mechglue/g_delete_sec_context.c | 2 +- src/lib/gssapi/mechglue/g_dsp_name.c | 2 +- src/lib/gssapi/mechglue/g_dsp_status.c | 2 +- src/lib/gssapi/mechglue/g_exp_sec_context.c | 2 +- src/lib/gssapi/mechglue/g_glue.c | 27 +++ src/lib/gssapi/mechglue/g_imp_name.c | 2 +- src/lib/gssapi/mechglue/g_imp_sec_context.c | 2 +- src/lib/gssapi/mechglue/g_indicate_mechs.c | 2 +- src/lib/gssapi/mechglue/g_init_sec_context.c | 14 +- src/lib/gssapi/mechglue/g_inquire_cred.c | 35 +++- src/lib/gssapi/mechglue/g_inquire_names.c | 6 +- src/lib/gssapi/mechglue/g_oid_ops.c | 12 +- src/lib/gssapi/mechglue/g_process_context.c | 2 +- src/lib/gssapi/mechglue/g_rel_buffer.c | 2 +- src/lib/gssapi/mechglue/g_rel_cred.c | 2 +- src/lib/gssapi/mechglue/g_rel_name.c | 2 +- src/lib/gssapi/mechglue/g_rel_oid_set.c | 2 +- src/lib/gssapi/mechglue/g_sign.c | 4 +- src/lib/gssapi/mechglue/g_unseal.c | 4 +- src/lib/gssapi/mechglue/g_verify.c | 4 +- src/lib/gssapi/mechglue/mglueP.h | 4 + 26 files changed, 324 insertions(+), 50 deletions(-) diff --git a/src/lib/gssapi/mechglue/ChangeLog b/src/lib/gssapi/mechglue/ChangeLog index 1a9afca67..9bcb3c6e9 100644 --- a/src/lib/gssapi/mechglue/ChangeLog +++ b/src/lib/gssapi/mechglue/ChangeLog @@ -1,5 +1,45 @@ Sat Feb 24 16:19:30 1996 Theodore Y. Ts'o + * 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() diff --git a/src/lib/gssapi/mechglue/g_accept_sec_context.c b/src/lib/gssapi/mechglue/g_accept_sec_context.c index 7fdc6f221..a1251a367 100644 --- a/src/lib/gssapi/mechglue/g_accept_sec_context.c +++ b/src/lib/gssapi/mechglue/g_accept_sec_context.c @@ -32,7 +32,7 @@ #endif #include -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 diff --git a/src/lib/gssapi/mechglue/g_acquire_cred.c b/src/lib/gssapi/mechglue/g_acquire_cred.c index dcc9329e8..99e8b0aca 100644 --- a/src/lib/gssapi/mechglue/g_acquire_cred.c +++ b/src/lib/gssapi/mechglue/g_acquire_cred.c @@ -31,12 +31,45 @@ #include #endif #include +#include #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); +} diff --git a/src/lib/gssapi/mechglue/g_compare_name.c b/src/lib/gssapi/mechglue/g_compare_name.c index 11d2cd66d..5fb617832 100644 --- a/src/lib/gssapi/mechglue/g_compare_name.c +++ b/src/lib/gssapi/mechglue/g_compare_name.c @@ -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, diff --git a/src/lib/gssapi/mechglue/g_context_time.c b/src/lib/gssapi/mechglue/g_context_time.c index 193d3906c..826bcb76a 100644 --- a/src/lib/gssapi/mechglue/g_context_time.c +++ b/src/lib/gssapi/mechglue/g_context_time.c @@ -28,7 +28,7 @@ #include "mglueP.h" -OM_uint32 +OM_uint32 INTERFACE gss_context_time (minor_status, context_handle, time_rec) diff --git a/src/lib/gssapi/mechglue/g_delete_sec_context.c b/src/lib/gssapi/mechglue/g_delete_sec_context.c index 6d6551a62..1a0d6e382 100644 --- a/src/lib/gssapi/mechglue/g_delete_sec_context.c +++ b/src/lib/gssapi/mechglue/g_delete_sec_context.c @@ -31,7 +31,7 @@ #include #endif -OM_uint32 +OM_uint32 INTERFACE gss_delete_sec_context (minor_status, context_handle, output_token) diff --git a/src/lib/gssapi/mechglue/g_dsp_name.c b/src/lib/gssapi/mechglue/g_dsp_name.c index 86d1ec19b..a353f1e7f 100644 --- a/src/lib/gssapi/mechglue/g_dsp_name.c +++ b/src/lib/gssapi/mechglue/g_dsp_name.c @@ -33,7 +33,7 @@ #endif #include -OM_uint32 +OM_uint32 INTERFACE gss_display_name (minor_status, input_name, output_name_buffer, diff --git a/src/lib/gssapi/mechglue/g_dsp_status.c b/src/lib/gssapi/mechglue/g_dsp_status.c index c4b35755e..5f5cc37b6 100644 --- a/src/lib/gssapi/mechglue/g_dsp_status.c +++ b/src/lib/gssapi/mechglue/g_dsp_status.c @@ -32,7 +32,7 @@ #include #endif -OM_uint32 +OM_uint32 INTERFACE gss_display_status (minor_status, status_value, status_type, diff --git a/src/lib/gssapi/mechglue/g_exp_sec_context.c b/src/lib/gssapi/mechglue/g_exp_sec_context.c index 2d623c19d..d68a9bdff 100644 --- a/src/lib/gssapi/mechglue/g_exp_sec_context.c +++ b/src/lib/gssapi/mechglue/g_exp_sec_context.c @@ -32,7 +32,7 @@ #include #endif -OM_uint32 +OM_uint32 INTERFACE gss_export_sec_context(minor_status, context_handle, interprocess_token) diff --git a/src/lib/gssapi/mechglue/g_glue.c b/src/lib/gssapi/mechglue/g_glue.c index 556d108e5..4809a1e8d 100644 --- a/src/lib/gssapi/mechglue/g_glue.c +++ b/src/lib/gssapi/mechglue/g_glue.c @@ -29,6 +29,10 @@ #endif #include +#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; +} + + diff --git a/src/lib/gssapi/mechglue/g_imp_name.c b/src/lib/gssapi/mechglue/g_imp_name.c index 27cd09256..c27fca45a 100644 --- a/src/lib/gssapi/mechglue/g_imp_name.c +++ b/src/lib/gssapi/mechglue/g_imp_name.c @@ -34,7 +34,7 @@ #include #include -OM_uint32 +OM_uint32 INTERFACE gss_import_name(minor_status, input_name_buffer, input_name_type, diff --git a/src/lib/gssapi/mechglue/g_imp_sec_context.c b/src/lib/gssapi/mechglue/g_imp_sec_context.c index 79a6bb2f9..02a3a7770 100644 --- a/src/lib/gssapi/mechglue/g_imp_sec_context.c +++ b/src/lib/gssapi/mechglue/g_imp_sec_context.c @@ -32,7 +32,7 @@ #include #endif -OM_uint32 +OM_uint32 INTERFACE gss_import_sec_context(minor_status, interprocess_token, context_handle) diff --git a/src/lib/gssapi/mechglue/g_indicate_mechs.c b/src/lib/gssapi/mechglue/g_indicate_mechs.c index 01cad3f1b..5e0aae97c 100644 --- a/src/lib/gssapi/mechglue/g_indicate_mechs.c +++ b/src/lib/gssapi/mechglue/g_indicate_mechs.c @@ -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) diff --git a/src/lib/gssapi/mechglue/g_init_sec_context.c b/src/lib/gssapi/mechglue/g_init_sec_context.c index 2d54436bf..c22cf949c 100644 --- a/src/lib/gssapi/mechglue/g_init_sec_context.c +++ b/src/lib/gssapi/mechglue/g_init_sec_context.c @@ -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, diff --git a/src/lib/gssapi/mechglue/g_inquire_cred.c b/src/lib/gssapi/mechglue/g_inquire_cred.c index cbc1997b0..e564661fa 100644 --- a/src/lib/gssapi/mechglue/g_inquire_cred.c +++ b/src/lib/gssapi/mechglue/g_inquire_cred.c @@ -32,7 +32,7 @@ #endif #include -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)); +} + diff --git a/src/lib/gssapi/mechglue/g_inquire_names.c b/src/lib/gssapi/mechglue/g_inquire_names.c index 0cd5e49a9..89330e43f 100644 --- a/src/lib/gssapi/mechglue/g_inquire_names.c +++ b/src/lib/gssapi/mechglue/g_inquire_names.c @@ -30,10 +30,8 @@ #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; diff --git a/src/lib/gssapi/mechglue/g_oid_ops.c b/src/lib/gssapi/mechglue/g_oid_ops.c index ee7cac70c..385298584 100644 --- a/src/lib/gssapi/mechglue/g_oid_ops.c +++ b/src/lib/gssapi/mechglue/g_oid_ops.c @@ -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; diff --git a/src/lib/gssapi/mechglue/g_process_context.c b/src/lib/gssapi/mechglue/g_process_context.c index 9c94bda32..467dbbcd2 100644 --- a/src/lib/gssapi/mechglue/g_process_context.c +++ b/src/lib/gssapi/mechglue/g_process_context.c @@ -28,7 +28,7 @@ #include "mglueP.h" -OM_uint32 +OM_uint32 INTERFACE gss_process_context_token (minor_status, context_handle, token_buffer) diff --git a/src/lib/gssapi/mechglue/g_rel_buffer.c b/src/lib/gssapi/mechglue/g_rel_buffer.c index c13bc72e2..f634c8052 100644 --- a/src/lib/gssapi/mechglue/g_rel_buffer.c +++ b/src/lib/gssapi/mechglue/g_rel_buffer.c @@ -31,7 +31,7 @@ #include #endif -OM_uint32 +OM_uint32 INTERFACE gss_release_buffer (minor_status, buffer) diff --git a/src/lib/gssapi/mechglue/g_rel_cred.c b/src/lib/gssapi/mechglue/g_rel_cred.c index ea11a08aa..50be113f1 100644 --- a/src/lib/gssapi/mechglue/g_rel_cred.c +++ b/src/lib/gssapi/mechglue/g_rel_cred.c @@ -31,7 +31,7 @@ #include #endif -OM_uint32 +OM_uint32 INTERFACE gss_release_cred(minor_status, cred_handle) diff --git a/src/lib/gssapi/mechglue/g_rel_name.c b/src/lib/gssapi/mechglue/g_rel_name.c index 1010304ad..64228d688 100644 --- a/src/lib/gssapi/mechglue/g_rel_name.c +++ b/src/lib/gssapi/mechglue/g_rel_name.c @@ -32,7 +32,7 @@ #endif #include -OM_uint32 +OM_uint32 INTERFACE gss_release_name (minor_status, input_name) diff --git a/src/lib/gssapi/mechglue/g_rel_oid_set.c b/src/lib/gssapi/mechglue/g_rel_oid_set.c index caa1e13ac..405a2c48d 100644 --- a/src/lib/gssapi/mechglue/g_rel_oid_set.c +++ b/src/lib/gssapi/mechglue/g_rel_oid_set.c @@ -31,7 +31,7 @@ #include #endif -OM_uint32 +OM_uint32 INTERFACE gss_release_oid_set (minor_status, set) diff --git a/src/lib/gssapi/mechglue/g_sign.c b/src/lib/gssapi/mechglue/g_sign.c index 19e386a5b..5345f00be 100644 --- a/src/lib/gssapi/mechglue/g_sign.c +++ b/src/lib/gssapi/mechglue/g_sign.c @@ -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, diff --git a/src/lib/gssapi/mechglue/g_unseal.c b/src/lib/gssapi/mechglue/g_unseal.c index f3f77c621..db7b5d923 100644 --- a/src/lib/gssapi/mechglue/g_unseal.c +++ b/src/lib/gssapi/mechglue/g_unseal.c @@ -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, diff --git a/src/lib/gssapi/mechglue/g_verify.c b/src/lib/gssapi/mechglue/g_verify.c index d7ca76402..c2b02a5eb 100644 --- a/src/lib/gssapi/mechglue/g_verify.c +++ b/src/lib/gssapi/mechglue/g_verify.c @@ -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, diff --git a/src/lib/gssapi/mechglue/mglueP.h b/src/lib/gssapi/mechglue/mglueP.h index 0abc81cf2..bd0fe68a5 100644 --- a/src/lib/gssapi/mechglue/mglueP.h +++ b/src/lib/gssapi/mechglue/mglueP.h @@ -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 */ -- 2.26.2