Indent.
[shishi.git] / gss / name.c
blob27a0a2ae834869d2433b43b0ad4fcc9e3da925d5
1 /* name.c Implementation of GSS-API Name Manipulation functions.
2 * Copyright (C) 2003 Simon Josefsson
4 * This file is part of Shishi.
6 * Shishi is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * Shishi is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with Shishi; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #include "internal.h"
24 /**
25 * gss_import_name:
26 * @minor_status: Mechanism specific status code
27 * @input_name_buffer: buffer containing contiguous string name to convert
28 * @input_name_type: Optional Object ID specifying type of printable
29 * name. Applications may specify either GSS_C_NO_OID to use a
30 * mechanism-specific default printable syntax, or an OID recognized
31 * by the GSS-API implementation to name a specific namespace.
32 * @output_name: returned name in internal form. Storage associated
33 * with this name must be freed by the application after use with a call
34 * to gss_release_name().
36 * Convert a contiguous string name to internal form. In general, the
37 * internal name returned (via the <output_name> parameter) will not
38 * be an MN; the exception to this is if the <input_name_type>
39 * indicates that the contiguous string provided via the
40 * <input_name_buffer> parameter is of type GSS_C_NT_EXPORT_NAME, in
41 * which case the returned internal name will be an MN for the
42 * mechanism that exported the name.
44 * Return value: GSS_S_COMPLETE Successful completion
45 * GSS_S_BAD_NAMETYPE The input_name_type was unrecognized
46 * GSS_S_BAD_NAME The input_name parameter could not be interpreted
47 * as a name of the specified type
48 * GSS_S_BAD_MECH The input name-type was GSS_C_NT_EXPORT_NAME,
49 * but the mechanism contained within the
50 * input-name is not supported
51 **/
52 OM_uint32
53 gss_import_name (OM_uint32 * minor_status,
54 const gss_buffer_t input_name_buffer,
55 const gss_OID input_name_type, gss_name_t * output_name)
59 OM_uint32
60 gss_display_name (OM_uint32 * minor_status,
61 const gss_name_t input_name,
62 gss_buffer_t output_name_buffer, gss_OID * output_name_type)
67 OM_uint32
68 gss_compare_name (OM_uint32 * minor_status,
69 const gss_name_t name1,
70 const gss_name_t name2, int *name_equal)
75 OM_uint32
76 gss_release_name (OM_uint32 * minor_status, gss_name_t * input_name)
81 OM_uint32
82 gss_inquire_names_for_mech (OM_uint32 * minor_status,
83 const gss_OID mechanism, gss_OID_set * name_types)
88 OM_uint32
89 gss_inquire_mechs_for_name (OM_uint32 * minor_status,
90 const gss_name_t input_name,
91 gss_OID_set * mech_types)
96 OM_uint32
97 gss_export_name (OM_uint32 * minor_status,
98 const gss_name_t input_name, gss_buffer_t exported_name)
102 OM_uint32
103 gss_canonicalize_name (OM_uint32 * minor_status,
104 const gss_name_t input_name,
105 const gss_OID mech_type, gss_name_t * output_name)
110 OM_uint32
111 gss_duplicate_name (OM_uint32 * minor_status,
112 const gss_name_t src_name, gss_name_t * dest_name)