2 * lib/gssapi/mechglue/g_oid_ops.c
4 * Copyright 1995 by the Massachusetts Institute of Technology.
7 * Export of this software from the United States of America may
8 * require a specific license from the United States Government.
9 * It is the responsibility of any person or organization contemplating
10 * export to obtain such a license before exporting.
12 * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
13 * distribute this software and its documentation for any purpose and
14 * without fee is hereby granted, provided that the above copyright
15 * notice appear in all copies and that both that copyright notice and
16 * this permission notice appear in supporting documentation, and that
17 * the name of M.I.T. not be used in advertising or publicity pertaining
18 * to distribution of the software without specific, written prior
19 * permission. Furthermore if you modify this software you must label
20 * your software as modified software and not distribute it in such a
21 * fashion that it might be confused with the original M.I.T. software.
22 * M.I.T. makes no representations about the suitability of
23 * this software for any purpose. It is provided "as is" without express
24 * or implied warranty.
29 * oid_ops.c - GSS-API V2 interfaces to manipulate OIDs
34 /* should include to get protos #include "../generic/gssapiP_generic.h" */
36 extern gss_mechanism *__gss_mechs_array;
38 OM_uint32 KRB5_CALLCONV
39 gss_release_oid(minor_status, oid)
40 OM_uint32 *minor_status;
44 OM_uint32 major_status;
46 /* first call the gss_internal_release_oid for each mechanism
47 * until one returns success. gss_internal_release_oid will only return
48 * success when the OID was recognized as an internal mechanism OID.
49 * if no mechanisms recognize the OID, then call the generic version.
52 for(i=0; __gss_mechs_array[i]->mech_type.length !=0; i++) {
53 if (__gss_mechs_array[i]->gss_internal_release_oid) {
54 major_status = __gss_mechs_array[i]->gss_internal_release_oid(
55 #ifdef USE_MECH_CONTEXT
56 __gss_mechs_array[i]->context,
61 fprintf(stderr, "gss_release_oid (glue): mech returned 0x%08x\n",
64 if (major_status == GSS_S_COMPLETE) {
65 return (GSS_S_COMPLETE);
71 fprintf(stderr, "gss_release_oid (glue): calling "
72 "generic_gss_release_oid with oid %p (*oid %p)\n", oid, *oid);
74 return generic_gss_release_oid(minor_status, oid);
77 OM_uint32 KRB5_CALLCONV
78 gss_create_empty_oid_set(minor_status, oid_set)
79 OM_uint32 *minor_status;
82 return generic_gss_create_empty_oid_set(minor_status, oid_set);
85 OM_uint32 KRB5_CALLCONV
86 gss_add_oid_set_member(minor_status, member_oid, oid_set)
87 OM_uint32 *minor_status;
91 return generic_gss_add_oid_set_member(minor_status, member_oid, oid_set);
94 OM_uint32 KRB5_CALLCONV
95 gss_test_oid_set_member(minor_status, member, set, present)
96 OM_uint32 *minor_status;
101 return generic_gss_test_oid_set_member(minor_status, member, set, present);
104 OM_uint32 KRB5_CALLCONV
105 gss_oid_to_str(minor_status, oid, oid_str)
106 OM_uint32 *minor_status;
108 gss_buffer_t oid_str;
110 return generic_gss_oid_to_str(minor_status, oid, oid_str);
113 OM_uint32 KRB5_CALLCONV
114 gss_str_to_oid(minor_status, oid_str, oid)
115 OM_uint32 *minor_status;
116 gss_buffer_t oid_str;
119 return generic_gss_str_to_oid(minor_status, oid_str, oid);