1   /*
   2    * Copyright (c) 1996,1997, by Sun Microsystems, Inc.
   3    * All rights reserved.
   4    */
   5 | #pragma ident        "@(#)g_oid_ops.c        1.12        04/09/08 SMI"
   5 | #pragma ident        "@(#)g_oid_ops.c        1.11        98/01/22 SMI"
   6   /*
   7    * lib/gssapi/mechglue/g_oid_ops.c
   8    *
   9    * Copyright 1995 by the Massachusetts Institute of Technology.
  10    * All Rights Reserved.
  11    *
  12    * Export of this software from the United States of America may
  13    *   require a specific license from the United States Government.
  14    *   It is the responsibility of any person or organization contemplating
  15    *   export to obtain such a license before exporting.
  16    *
  17    * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
  18    * distribute this software and its documentation for any purpose and
  19    * without fee is hereby granted, provided that the above copyright
  20    * notice appear in all copies and that both that copyright notice and
  21    * this permission notice appear in supporting documentation, and that
  22    * the name of M.I.T. not be used in advertising or publicity pertaining
  23    * to distribution of the software without specific, written prior
  24    * permission.  M.I.T. makes no representations about the suitability of
  25    * this software for any purpose.  It is provided "as is" without express
  26    * or implied warranty.
  27    *
  28    */
  29   
  30   /*
  31    * oid_ops.c - GSS-API V2 interfaces to manipulate OIDs
  32    */
  33   
  34   #include <mechglueP.h>
  35   
  36 | extern gss_mechanism *__gss_mechs_array;
  37 |  
  38 | OM_uint32 KRB5_CALLCONV
  39 | gss_release_oid(minor_status, oid)
  36 | /*
  37 |  * gss_release_oid has been moved to g_initialize, becasue it requires access
  38 |  * to the mechanism list.  All functions requiring direct access to the
  39 |  * mechanism list are now in g_initialize.c
  40 -     OM_uint32   *minor_status;
  41 -     gss_OID     *oid;
  42 - {
  43 -     int i;
  44 -     OM_uint32   major_status;
  45 -  
  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.
  40    */
  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 -                                             __gss_mechs_array[i]->context,
  56 -                                             minor_status,
  57 -                                             oid);
  58 -             if (major_status == GSS_S_COMPLETE) {
  59 -                 return (GSS_S_COMPLETE);
  60 -             }
  61 -         }
  62 -     }
  63 -  
  64 -     return generic_gss_release_oid(minor_status, oid);
  65 - }
  66 - 
  41   
  42   OM_uint32
  43   gss_create_empty_oid_set(minor_status, oid_set)
  44           OM_uint32                *minor_status;
  45           gss_OID_set                *oid_set;
  46   {
  47                   return (generic_gss_create_empty_oid_set(minor_status,
  48                                   oid_set));
  49   }

 ----Unchanged portion omitted----