Release 0.0r
[heimdal.git] / lib / gssapi / krb5 / external.c
blob7e0ac1d84057459eee91c3b033e5f0134113aa71
1 /*
2 * Copyright (c) 1997 Kungliga Tekniska Högskolan
3 * (Royal Institute of Technology, Stockholm, Sweden).
4 * All rights reserved.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
17 * 3. All advertising materials mentioning features or use of this software
18 * must display the following acknowledgement:
19 * This product includes software developed by Kungliga Tekniska
20 * Högskolan and its contributors.
22 * 4. Neither the name of the Institute nor the names of its contributors
23 * may be used to endorse or promote products derived from this software
24 * without specific prior written permission.
26 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
27 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
39 #include "gssapi_locl.h"
41 RCSID("$Id$");
44 * The implementation must reserve static storage for a
45 * gss_OID_desc object containing the value
46 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
47 * "\x01\x02\x01\x01"},
48 * corresponding to an object-identifier value of
49 * {iso(1) member-body(2) United States(840) mit(113554)
50 * infosys(1) gssapi(2) generic(1) user_name(1)}. The constant
51 * GSS_C_NT_USER_NAME should be initialized to point
52 * to that gss_OID_desc.
55 static gss_OID_desc gss_c_nt_user_name_oid_desc =
56 {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
57 "\x01\x02\x01\x01"};
59 gss_OID GSS_C_NT_USER_NAME = &gss_c_nt_user_name_oid_desc;
62 * The implementation must reserve static storage for a
63 * gss_OID_desc object containing the value
64 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
65 * "\x01\x02\x01\x02"},
66 * corresponding to an object-identifier value of
67 * {iso(1) member-body(2) United States(840) mit(113554)
68 * infosys(1) gssapi(2) generic(1) machine_uid_name(2)}.
69 * The constant GSS_C_NT_MACHINE_UID_NAME should be
70 * initialized to point to that gss_OID_desc.
73 static gss_OID_desc gss_c_nt_machine_uid_name_oid_desc =
74 {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
75 "\x01\x02\x01\x02"};
77 gss_OID GSS_C_NT_MACHINE_UID_NAME = &gss_c_nt_machine_uid_name_oid_desc;
80 * The implementation must reserve static storage for a
81 * gss_OID_desc object containing the value
82 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
83 * "\x01\x02\x01\x03"},
84 * corresponding to an object-identifier value of
85 * {iso(1) member-body(2) United States(840) mit(113554)
86 * infosys(1) gssapi(2) generic(1) string_uid_name(3)}.
87 * The constant GSS_C_NT_STRING_UID_NAME should be
88 * initialized to point to that gss_OID_desc.
91 static gss_OID_desc gss_c_nt_string_uid_name_oid_desc =
92 {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
93 "\x01\x02\x01\x03"};
95 gss_OID GSS_C_NT_STRING_UID_NAME = &gss_c_nt_string_uid_name_oid_desc;
98 * The implementation must reserve static storage for a
99 * gss_OID_desc object containing the value
100 * {6, (void *)"\x2b\x06\x01\x05\x06\x02"},
101 * corresponding to an object-identifier value of
102 * {1(iso), 3(org), 6(dod), 1(internet), 5(security),
103 * 6(nametypes), 2(gss-host-based-services)}. The constant
104 * GSS_C_NT_HOSTBASED_SERVICE should be initialized to point
105 * to that gss_OID_desc.
108 static gss_OID_desc gss_c_nt_hostbased_service_oid_desc =
109 {6, (void *)"\x2b\x06\x01\x05\x06\x02"};
111 gss_OID GSS_C_NT_HOSTBASED_SERVICE = &gss_c_nt_hostbased_service_oid_desc;
114 * The implementation must reserve static storage for a
115 * gss_OID_desc object containing the value
116 * {6, (void *)"\x2b\x06\01\x05\x06\x03"},
117 * corresponding to an object identifier value of
118 * {1(iso), 3(org), 6(dod), 1(internet), 5(security),
119 * 6(nametypes), 3(gss-anonymous-name)}. The constant
120 * and GSS_C_NT_ANONYMOUS should be initialized to point
121 * to that gss_OID_desc.
124 static gss_OID_desc gss_c_nt_anonymous_oid_desc =
125 {6, (void *)"\x2b\x06\01\x05\x06\x03"};
127 gss_OID GSS_C_NT_ANONYMOUS = &gss_c_nt_anonymous_oid_desc;
130 * The implementation must reserve static storage for a
131 * gss_OID_desc object containing the value
132 * {6, (void *)"\x2b\x06\x01\x05\x06\x04"},
133 * corresponding to an object-identifier value of
134 * {1(iso), 3(org), 6(dod), 1(internet), 5(security),
135 * 6(nametypes), 4(gss-api-exported-name)}. The constant
136 * GSS_C_NT_EXPORT_NAME should be initialized to point
137 * to that gss_OID_desc.
140 static gss_OID_desc gss_c_nt_export_name_oid_desc =
141 {6, (void *)"\x2b\x06\x01\x05\x06\x04"};
143 gss_OID GSS_C_NT_EXPORT_NAME = &gss_c_nt_export_name_oid_desc;
146 * This name form shall be represented by the Object Identifier {iso(1)
147 * member-body(2) United States(840) mit(113554) infosys(1) gssapi(2)
148 * krb5(2) krb5_name(1)}. The recommended symbolic name for this type
149 * is "GSS_KRB5_NT_PRINCIPAL_NAME".
152 static gss_OID_desc gss_krb5_nt_principal_name_oid_desc =
153 {10, (void *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x02\x01"};
155 gss_OID GSS_KRB5_NT_PRINCIPAL_NAME = &gss_krb5_nt_principal_name_oid_desc;
158 * This name form shall be represented by the Object Identifier {iso(1)
159 * member-body(2) United States(840) mit(113554) infosys(1) gssapi(2)
160 * generic(1) user_name(1)}. The recommended symbolic name for this
161 * type is "GSS_KRB5_NT_USER_NAME".
164 gss_OID GSS_KRB5_NT_USER_NAME = &gss_c_nt_user_name_oid_desc;
167 * This name form shall be represented by the Object Identifier {iso(1)
168 * member-body(2) United States(840) mit(113554) infosys(1) gssapi(2)
169 * generic(1) machine_uid_name(2)}. The recommended symbolic name for
170 * this type is "GSS_KRB5_NT_MACHINE_UID_NAME".
173 gss_OID GSS_KRB5_NT_MACHINE_UID_NAME = &gss_c_nt_machine_uid_name_oid_desc;
176 * This name form shall be represented by the Object Identifier {iso(1)
177 * member-body(2) United States(840) mit(113554) infosys(1) gssapi(2)
178 * generic(1) string_uid_name(3)}. The recommended symbolic name for
179 * this type is "GSS_KRB5_NT_STRING_UID_NAME".
182 gss_OID GSS_KRB5_NT_STRING_UID_NAME = &gss_c_nt_string_uid_name_oid_desc;
185 * To support ongoing experimentation, testing, and evolution of the
186 * specification, the Kerberos V5 GSS-API mechanism as defined in this
187 * and any successor memos will be identified with the following Object
188 * Identifier, as defined in RFC-1510, until the specification is
189 * advanced to the level of Proposed Standard RFC:
191 * {iso(1), org(3), dod(5), internet(1), security(5), kerberosv5(2)}
193 * Upon advancement to the level of Proposed Standard RFC, the Kerberos
194 * V5 GSS-API mechanism will be identified by an Object Identifier
195 * having the value:
197 * {iso(1) member-body(2) United States(840) mit(113554) infosys(1)
198 * gssapi(2) krb5(2)}
201 #if 0 /* This is the old OID */
203 static gss_OID_desc gss_krb5_mechanism_oid_desc =
204 {5, (void *)"\x2b\x05\x01\x05\x02"};
206 #endif
208 static gss_OID_desc gss_krb5_mechanism_oid_desc =
209 {9, (void *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x02"};
211 gss_OID GSS_KRB5_MECHANISM = &gss_krb5_mechanism_oid_desc;
214 * Context for krb5 calls.
217 krb5_context gssapi_krb5_context;