2 * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
5 * lib/gssapi/mechglue/g_oid_ops.c
7 * Copyright 1995 by the Massachusetts Institute of Technology.
10 * Export of this software from the United States of America may
11 * require a specific license from the United States Government.
12 * It is the responsibility of any person or organization contemplating
13 * export to obtain such a license before exporting.
15 * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
16 * distribute this software and its documentation for any purpose and
17 * without fee is hereby granted, provided that the above copyright
18 * notice appear in all copies and that both that copyright notice and
19 * this permission notice appear in supporting documentation, and that
20 * the name of M.I.T. not be used in advertising or publicity pertaining
21 * to distribution of the software without specific, written prior
22 * permission. 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
32 #include <mechglueP.h>
33 #include "gssapiP_generic.h"
36 * gss_release_oid has been moved to g_initialize, becasue it requires access
37 * to the mechanism list. All functions requiring direct access to the
38 * mechanism list are now in g_initialize.c
42 gss_create_empty_oid_set(minor_status
, oid_set
)
43 OM_uint32
*minor_status
;
47 status
= generic_gss_create_empty_oid_set(minor_status
, oid_set
);
48 if (status
!= GSS_S_COMPLETE
)
49 map_errcode(minor_status
);
54 gss_add_oid_set_member(minor_status
, member_oid
, oid_set
)
55 OM_uint32
*minor_status
;
56 const gss_OID member_oid
;
60 status
= generic_gss_add_oid_set_member(minor_status
, member_oid
,
62 if (status
!= GSS_S_COMPLETE
)
63 map_errcode(minor_status
);
68 gss_test_oid_set_member(minor_status
, member
, set
, present
)
69 OM_uint32
*minor_status
;
71 const gss_OID_set set
;
74 return (generic_gss_test_oid_set_member(minor_status
, member
, set
,
79 gss_oid_to_str(minor_status
, oid
, oid_str
)
80 OM_uint32
*minor_status
;
84 OM_uint32 status
= generic_gss_oid_to_str(minor_status
, oid
, oid_str
);
85 if (status
!= GSS_S_COMPLETE
)
86 map_errcode(minor_status
);
91 gss_str_to_oid(minor_status
, oid_str
, oid
)
92 OM_uint32
*minor_status
;
93 const gss_buffer_t oid_str
;
96 OM_uint32 status
= generic_gss_str_to_oid(minor_status
, oid_str
, oid
);
97 if (status
!= GSS_S_COMPLETE
)
98 map_errcode(minor_status
);