1184588Sdfr/*-
2184588Sdfr * Copyright (c) 2005 Doug Rabson
3184588Sdfr * All rights reserved.
4184588Sdfr *
5184588Sdfr * Redistribution and use in source and binary forms, with or without
6184588Sdfr * modification, are permitted provided that the following conditions
7184588Sdfr * are met:
8184588Sdfr * 1. Redistributions of source code must retain the above copyright
9184588Sdfr *    notice, this list of conditions and the following disclaimer.
10184588Sdfr * 2. Redistributions in binary form must reproduce the above copyright
11184588Sdfr *    notice, this list of conditions and the following disclaimer in the
12184588Sdfr *    documentation and/or other materials provided with the distribution.
13184588Sdfr *
14184588Sdfr * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15184588Sdfr * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16184588Sdfr * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17184588Sdfr * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18184588Sdfr * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19184588Sdfr * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20184588Sdfr * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21184588Sdfr * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22184588Sdfr * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23184588Sdfr * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24184588Sdfr * SUCH DAMAGE.
25184588Sdfr */
26184588Sdfr
27184588Sdfr#include <sys/cdefs.h>
28184588Sdfr__FBSDID("$FreeBSD$");
29184588Sdfr
30184588Sdfr#include <sys/param.h>
31184588Sdfr#include <kgssapi/gssapi.h>
32184588Sdfr
33184588Sdfr/*
34184588Sdfr * The implementation must reserve static storage for a
35184588Sdfr * gss_OID_desc object containing the value
36184588Sdfr * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
37184588Sdfr * "\x01\x02\x01\x01"},
38184588Sdfr * corresponding to an object-identifier value of
39184588Sdfr * {iso(1) member-body(2) United States(840) mit(113554)
40184588Sdfr * infosys(1) gssapi(2) generic(1) user_name(1)}.  The constant
41184588Sdfr * GSS_C_NT_USER_NAME should be initialized to point
42184588Sdfr * to that gss_OID_desc.
43184588Sdfr */
44184588Sdfrstatic gss_OID_desc GSS_C_NT_USER_NAME_storage =
45184588Sdfr	{10, (void *)(uintptr_t)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x01"};
46184588Sdfrgss_OID GSS_C_NT_USER_NAME = &GSS_C_NT_USER_NAME_storage;
47184588Sdfr
48184588Sdfr/*
49184588Sdfr * The implementation must reserve static storage for a
50184588Sdfr * gss_OID_desc object containing the value
51184588Sdfr * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
52184588Sdfr *              "\x01\x02\x01\x02"},
53184588Sdfr * corresponding to an object-identifier value of
54184588Sdfr * {iso(1) member-body(2) United States(840) mit(113554)
55184588Sdfr * infosys(1) gssapi(2) generic(1) machine_uid_name(2)}.
56184588Sdfr * The constant GSS_C_NT_MACHINE_UID_NAME should be
57184588Sdfr * initialized to point to that gss_OID_desc.
58184588Sdfr */
59184588Sdfrstatic gss_OID_desc GSS_C_NT_MACHINE_UID_NAME_storage =
60184588Sdfr	{10, (void *)(uintptr_t)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x02"};
61184588Sdfrgss_OID GSS_C_NT_MACHINE_UID_NAME = &GSS_C_NT_MACHINE_UID_NAME_storage;
62184588Sdfr
63184588Sdfr/*
64184588Sdfr * The implementation must reserve static storage for a
65184588Sdfr * gss_OID_desc object containing the value
66184588Sdfr * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
67184588Sdfr *              "\x01\x02\x01\x03"},
68184588Sdfr * corresponding to an object-identifier value of
69184588Sdfr * {iso(1) member-body(2) United States(840) mit(113554)
70184588Sdfr * infosys(1) gssapi(2) generic(1) string_uid_name(3)}.
71184588Sdfr * The constant GSS_C_NT_STRING_UID_NAME should be
72184588Sdfr * initialized to point to that gss_OID_desc.
73184588Sdfr */
74184588Sdfrstatic gss_OID_desc GSS_C_NT_STRING_UID_NAME_storage =
75184588Sdfr	{10, (void *)(uintptr_t)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x03"};
76184588Sdfrgss_OID GSS_C_NT_STRING_UID_NAME = &GSS_C_NT_STRING_UID_NAME_storage;
77184588Sdfr
78184588Sdfr/*
79184588Sdfr * The implementation must reserve static storage for a
80184588Sdfr * gss_OID_desc object containing the value
81184588Sdfr * {6, (void *)"\x2b\x06\x01\x05\x06\x02"},
82184588Sdfr * corresponding to an object-identifier value of
83184588Sdfr * {iso(1) org(3) dod(6) internet(1) security(5)
84184588Sdfr * nametypes(6) gss-host-based-services(2)).  The constant
85184588Sdfr * GSS_C_NT_HOSTBASED_SERVICE_X should be initialized to point
86184588Sdfr * to that gss_OID_desc.  This is a deprecated OID value, and
87184588Sdfr * implementations wishing to support hostbased-service names
88184588Sdfr * should instead use the GSS_C_NT_HOSTBASED_SERVICE OID,
89184588Sdfr * defined below, to identify such names;
90184588Sdfr * GSS_C_NT_HOSTBASED_SERVICE_X should be accepted a synonym
91184588Sdfr * for GSS_C_NT_HOSTBASED_SERVICE when presented as an input
92184588Sdfr * parameter, but should not be emitted by GSS-API
93184588Sdfr * implementations
94184588Sdfr */
95184588Sdfrstatic gss_OID_desc GSS_C_NT_HOSTBASED_SERVICE_X_storage =
96184588Sdfr	{6, (void *)(uintptr_t)"\x2b\x06\x01\x05\x06\x02"};
97184588Sdfrgss_OID GSS_C_NT_HOSTBASED_SERVICE_X = &GSS_C_NT_HOSTBASED_SERVICE_X_storage;
98184588Sdfr
99184588Sdfr/*
100184588Sdfr * The implementation must reserve static storage for a
101184588Sdfr * gss_OID_desc object containing the value
102184588Sdfr * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
103184588Sdfr *              "\x01\x02\x01\x04"}, corresponding to an
104184588Sdfr * object-identifier value of {iso(1) member-body(2)
105184588Sdfr * Unites States(840) mit(113554) infosys(1) gssapi(2)
106184588Sdfr * generic(1) service_name(4)}.  The constant
107184588Sdfr * GSS_C_NT_HOSTBASED_SERVICE should be initialized
108184588Sdfr * to point to that gss_OID_desc.
109184588Sdfr */
110184588Sdfrstatic gss_OID_desc GSS_C_NT_HOSTBASED_SERVICE_storage =
111184588Sdfr	{10, (void *)(uintptr_t)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x04"};
112184588Sdfrgss_OID GSS_C_NT_HOSTBASED_SERVICE = &GSS_C_NT_HOSTBASED_SERVICE_storage;
113184588Sdfr
114184588Sdfr/*
115184588Sdfr * The implementation must reserve static storage for a
116184588Sdfr * gss_OID_desc object containing the value
117184588Sdfr * {6, (void *)"\x2b\x06\01\x05\x06\x03"},
118184588Sdfr * corresponding to an object identifier value of
119184588Sdfr * {1(iso), 3(org), 6(dod), 1(internet), 5(security),
120184588Sdfr * 6(nametypes), 3(gss-anonymous-name)}.  The constant
121184588Sdfr * and GSS_C_NT_ANONYMOUS should be initialized to point
122184588Sdfr * to that gss_OID_desc.
123184588Sdfr */
124184588Sdfrstatic gss_OID_desc GSS_C_NT_ANONYMOUS_storage =
125184588Sdfr	{6, (void *)(uintptr_t)"\x2b\x06\01\x05\x06\x03"};
126184588Sdfrgss_OID GSS_C_NT_ANONYMOUS = &GSS_C_NT_ANONYMOUS_storage;
127184588Sdfr
128184588Sdfr/*
129184588Sdfr * The implementation must reserve static storage for a
130184588Sdfr * gss_OID_desc object containing the value
131184588Sdfr * {6, (void *)"\x2b\x06\x01\x05\x06\x04"},
132184588Sdfr * corresponding to an object-identifier value of
133184588Sdfr * {1(iso), 3(org), 6(dod), 1(internet), 5(security),
134184588Sdfr * 6(nametypes), 4(gss-api-exported-name)}.  The constant
135184588Sdfr * GSS_C_NT_EXPORT_NAME should be initialized to point
136184588Sdfr * to that gss_OID_desc.
137184588Sdfr */
138184588Sdfrstatic gss_OID_desc GSS_C_NT_EXPORT_NAME_storage =
139184588Sdfr	{6, (void *)(uintptr_t)"\x2b\x06\x01\x05\x06\x04"};
140184588Sdfrgss_OID GSS_C_NT_EXPORT_NAME = &GSS_C_NT_EXPORT_NAME_storage;
141184588Sdfr
142184588Sdfr/*
143184588Sdfr *   This name form shall be represented by the Object Identifier {iso(1)
144184588Sdfr *   member-body(2) United States(840) mit(113554) infosys(1) gssapi(2)
145184588Sdfr *   krb5(2) krb5_name(1)}.  The recommended symbolic name for this type
146184588Sdfr *   is "GSS_KRB5_NT_PRINCIPAL_NAME".
147184588Sdfr */
148184588Sdfrstatic gss_OID_desc GSS_KRB5_NT_PRINCIPAL_NAME_storage =
149184588Sdfr        {10, (void *)(uintptr_t)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x02\x01"};
150184588Sdfrgss_OID GSS_KRB5_NT_PRINCIPAL_NAME = &GSS_KRB5_NT_PRINCIPAL_NAME_storage;
151184588Sdfr
152184588Sdfr/*
153184588Sdfr * This name form shall be represented by the Object Identifier {iso(1)
154184588Sdfr * member-body(2) United States(840) mit(113554) infosys(1) gssapi(2)
155184588Sdfr * generic(1) user_name(1)}.  The recommended symbolic name for this
156184588Sdfr * type is "GSS_KRB5_NT_USER_NAME".
157184588Sdfr */
158184588Sdfrgss_OID GSS_KRB5_NT_USER_NAME = &GSS_C_NT_USER_NAME_storage;
159184588Sdfr
160184588Sdfr/*
161184588Sdfr * This name form shall be represented by the Object Identifier {iso(1)
162184588Sdfr * member-body(2) United States(840) mit(113554) infosys(1) gssapi(2)
163184588Sdfr * generic(1) machine_uid_name(2)}.  The recommended symbolic name for
164184588Sdfr * this type is "GSS_KRB5_NT_MACHINE_UID_NAME".
165184588Sdfr */
166184588Sdfrgss_OID GSS_KRB5_NT_MACHINE_UID_NAME = &GSS_C_NT_MACHINE_UID_NAME_storage;
167184588Sdfr
168184588Sdfr/*
169184588Sdfr * This name form shall be represented by the Object Identifier {iso(1)
170184588Sdfr * member-body(2) United States(840) mit(113554) infosys(1) gssapi(2)
171184588Sdfr * generic(1) string_uid_name(3)}.  The recommended symbolic name for
172184588Sdfr * this type is "GSS_KRB5_NT_STRING_UID_NAME".
173184588Sdfr */
174184588Sdfrgss_OID GSS_KRB5_NT_STRING_UID_NAME = &GSS_C_NT_STRING_UID_NAME_storage;
175184588Sdfr
176184588Sdfr
177