clean
[heimdal.git] / lib / gssapi / krb5 / external.c
blob0bd77fe62f160969f5fbc22d304eb9862bbfb7d7
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. Neither the name of the Institute nor the names of its contributors
18 * may be used to endorse or promote products derived from this software
19 * without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
34 #include "gssapi_locl.h"
36 RCSID("$Id$");
39 * The implementation must reserve static storage for a
40 * gss_OID_desc object containing the value
41 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
42 * "\x01\x02\x01\x01"},
43 * corresponding to an object-identifier value of
44 * {iso(1) member-body(2) United States(840) mit(113554)
45 * infosys(1) gssapi(2) generic(1) user_name(1)}. The constant
46 * GSS_C_NT_USER_NAME should be initialized to point
47 * to that gss_OID_desc.
50 static gss_OID_desc gss_c_nt_user_name_oid_desc =
51 {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
52 "\x01\x02\x01\x01"};
54 gss_OID GSS_C_NT_USER_NAME = &gss_c_nt_user_name_oid_desc;
57 * The implementation must reserve static storage for a
58 * gss_OID_desc object containing the value
59 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
60 * "\x01\x02\x01\x02"},
61 * corresponding to an object-identifier value of
62 * {iso(1) member-body(2) United States(840) mit(113554)
63 * infosys(1) gssapi(2) generic(1) machine_uid_name(2)}.
64 * The constant GSS_C_NT_MACHINE_UID_NAME should be
65 * initialized to point to that gss_OID_desc.
68 static gss_OID_desc gss_c_nt_machine_uid_name_oid_desc =
69 {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
70 "\x01\x02\x01\x02"};
72 gss_OID GSS_C_NT_MACHINE_UID_NAME = &gss_c_nt_machine_uid_name_oid_desc;
75 * The implementation must reserve static storage for a
76 * gss_OID_desc object containing the value
77 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
78 * "\x01\x02\x01\x03"},
79 * corresponding to an object-identifier value of
80 * {iso(1) member-body(2) United States(840) mit(113554)
81 * infosys(1) gssapi(2) generic(1) string_uid_name(3)}.
82 * The constant GSS_C_NT_STRING_UID_NAME should be
83 * initialized to point to that gss_OID_desc.
86 static gss_OID_desc gss_c_nt_string_uid_name_oid_desc =
87 {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
88 "\x01\x02\x01\x03"};
90 gss_OID GSS_C_NT_STRING_UID_NAME = &gss_c_nt_string_uid_name_oid_desc;
93 * The implementation must reserve static storage for a
94 * gss_OID_desc object containing the value
95 * {6, (void *)"\x2b\x06\x01\x05\x06\x02"},
96 * corresponding to an object-identifier value of
97 * {1(iso), 3(org), 6(dod), 1(internet), 5(security),
98 * 6(nametypes), 2(gss-host-based-services)}. The constant
99 * GSS_C_NT_HOSTBASED_SERVICE should be initialized to point
100 * to that gss_OID_desc.
103 static gss_OID_desc gss_c_nt_hostbased_service_oid_desc =
104 {6, (void *)"\x2b\x06\x01\x05\x06\x02"};
106 gss_OID GSS_C_NT_HOSTBASED_SERVICE = &gss_c_nt_hostbased_service_oid_desc;
109 * The implementation must reserve static storage for a
110 * gss_OID_desc object containing the value
111 * {6, (void *)"\x2b\x06\01\x05\x06\x03"},
112 * corresponding to an object identifier value of
113 * {1(iso), 3(org), 6(dod), 1(internet), 5(security),
114 * 6(nametypes), 3(gss-anonymous-name)}. The constant
115 * and GSS_C_NT_ANONYMOUS should be initialized to point
116 * to that gss_OID_desc.
119 static gss_OID_desc gss_c_nt_anonymous_oid_desc =
120 {6, (void *)"\x2b\x06\01\x05\x06\x03"};
122 gss_OID GSS_C_NT_ANONYMOUS = &gss_c_nt_anonymous_oid_desc;
125 * The implementation must reserve static storage for a
126 * gss_OID_desc object containing the value
127 * {6, (void *)"\x2b\x06\x01\x05\x06\x04"},
128 * corresponding to an object-identifier value of
129 * {1(iso), 3(org), 6(dod), 1(internet), 5(security),
130 * 6(nametypes), 4(gss-api-exported-name)}. The constant
131 * GSS_C_NT_EXPORT_NAME should be initialized to point
132 * to that gss_OID_desc.
135 static gss_OID_desc gss_c_nt_export_name_oid_desc =
136 {6, (void *)"\x2b\x06\x01\x05\x06\x04"};
138 gss_OID GSS_C_NT_EXPORT_NAME = &gss_c_nt_export_name_oid_desc;
141 * This name form shall be represented by the Object Identifier {iso(1)
142 * member-body(2) United States(840) mit(113554) infosys(1) gssapi(2)
143 * krb5(2) krb5_name(1)}. The recommended symbolic name for this type
144 * is "GSS_KRB5_NT_PRINCIPAL_NAME".
147 static gss_OID_desc gss_krb5_nt_principal_name_oid_desc =
148 {10, (void *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x02\x01"};
150 gss_OID GSS_KRB5_NT_PRINCIPAL_NAME = &gss_krb5_nt_principal_name_oid_desc;
153 * This name form shall be represented by the Object Identifier {iso(1)
154 * member-body(2) United States(840) mit(113554) infosys(1) gssapi(2)
155 * generic(1) user_name(1)}. The recommended symbolic name for this
156 * type is "GSS_KRB5_NT_USER_NAME".
159 gss_OID GSS_KRB5_NT_USER_NAME = &gss_c_nt_user_name_oid_desc;
162 * This name form shall be represented by the Object Identifier {iso(1)
163 * member-body(2) United States(840) mit(113554) infosys(1) gssapi(2)
164 * generic(1) machine_uid_name(2)}. The recommended symbolic name for
165 * this type is "GSS_KRB5_NT_MACHINE_UID_NAME".
168 gss_OID GSS_KRB5_NT_MACHINE_UID_NAME = &gss_c_nt_machine_uid_name_oid_desc;
171 * This name form shall be represented by the Object Identifier {iso(1)
172 * member-body(2) United States(840) mit(113554) infosys(1) gssapi(2)
173 * generic(1) string_uid_name(3)}. The recommended symbolic name for
174 * this type is "GSS_KRB5_NT_STRING_UID_NAME".
177 gss_OID GSS_KRB5_NT_STRING_UID_NAME = &gss_c_nt_string_uid_name_oid_desc;
180 * To support ongoing experimentation, testing, and evolution of the
181 * specification, the Kerberos V5 GSS-API mechanism as defined in this
182 * and any successor memos will be identified with the following Object
183 * Identifier, as defined in RFC-1510, until the specification is
184 * advanced to the level of Proposed Standard RFC:
186 * {iso(1), org(3), dod(5), internet(1), security(5), kerberosv5(2)}
188 * Upon advancement to the level of Proposed Standard RFC, the Kerberos
189 * V5 GSS-API mechanism will be identified by an Object Identifier
190 * having the value:
192 * {iso(1) member-body(2) United States(840) mit(113554) infosys(1)
193 * gssapi(2) krb5(2)}
196 #if 0 /* This is the old OID */
198 static gss_OID_desc gss_krb5_mechanism_oid_desc =
199 {5, (void *)"\x2b\x05\x01\x05\x02"};
201 #endif
203 static gss_OID_desc gss_krb5_mechanism_oid_desc =
204 {9, (void *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x02"};
206 gss_OID GSS_KRB5_MECHANISM = &gss_krb5_mechanism_oid_desc;
209 * Context for krb5 calls.
212 krb5_context gssapi_krb5_context;