1a9148abdSDoug Rabson /*- 2*4d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause 34de8ade9SPedro F. Giffuni * 4a9148abdSDoug Rabson * Copyright (c) 2005 Doug Rabson 5a9148abdSDoug Rabson * All rights reserved. 6a9148abdSDoug Rabson * 7a9148abdSDoug Rabson * Redistribution and use in source and binary forms, with or without 8a9148abdSDoug Rabson * modification, are permitted provided that the following conditions 9a9148abdSDoug Rabson * are met: 10a9148abdSDoug Rabson * 1. Redistributions of source code must retain the above copyright 11a9148abdSDoug Rabson * notice, this list of conditions and the following disclaimer. 12a9148abdSDoug Rabson * 2. Redistributions in binary form must reproduce the above copyright 13a9148abdSDoug Rabson * notice, this list of conditions and the following disclaimer in the 14a9148abdSDoug Rabson * documentation and/or other materials provided with the distribution. 15a9148abdSDoug Rabson * 16a9148abdSDoug Rabson * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17a9148abdSDoug Rabson * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18a9148abdSDoug Rabson * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19a9148abdSDoug Rabson * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20a9148abdSDoug Rabson * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21a9148abdSDoug Rabson * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22a9148abdSDoug Rabson * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23a9148abdSDoug Rabson * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24a9148abdSDoug Rabson * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25a9148abdSDoug Rabson * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26a9148abdSDoug Rabson * SUCH DAMAGE. 27a9148abdSDoug Rabson */ 28a9148abdSDoug Rabson 29a9148abdSDoug Rabson #include <sys/param.h> 30a9148abdSDoug Rabson #include <kgssapi/gssapi.h> 31a9148abdSDoug Rabson 32a9148abdSDoug Rabson /* 33a9148abdSDoug Rabson * The implementation must reserve static storage for a 34a9148abdSDoug Rabson * gss_OID_desc object containing the value 35a9148abdSDoug Rabson * {10, (void *)"\x2a\x86\x48\x86\xf7\x12" 36a9148abdSDoug Rabson * "\x01\x02\x01\x01"}, 37a9148abdSDoug Rabson * corresponding to an object-identifier value of 38a9148abdSDoug Rabson * {iso(1) member-body(2) United States(840) mit(113554) 39a9148abdSDoug Rabson * infosys(1) gssapi(2) generic(1) user_name(1)}. The constant 40a9148abdSDoug Rabson * GSS_C_NT_USER_NAME should be initialized to point 41a9148abdSDoug Rabson * to that gss_OID_desc. 42a9148abdSDoug Rabson */ 43a9148abdSDoug Rabson static gss_OID_desc GSS_C_NT_USER_NAME_storage = 44a9148abdSDoug Rabson {10, (void *)(uintptr_t)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x01"}; 45a9148abdSDoug Rabson gss_OID GSS_C_NT_USER_NAME = &GSS_C_NT_USER_NAME_storage; 46a9148abdSDoug Rabson 47a9148abdSDoug Rabson /* 48a9148abdSDoug Rabson * The implementation must reserve static storage for a 49a9148abdSDoug Rabson * gss_OID_desc object containing the value 50a9148abdSDoug Rabson * {10, (void *)"\x2a\x86\x48\x86\xf7\x12" 51a9148abdSDoug Rabson * "\x01\x02\x01\x02"}, 52a9148abdSDoug Rabson * corresponding to an object-identifier value of 53a9148abdSDoug Rabson * {iso(1) member-body(2) United States(840) mit(113554) 54a9148abdSDoug Rabson * infosys(1) gssapi(2) generic(1) machine_uid_name(2)}. 55a9148abdSDoug Rabson * The constant GSS_C_NT_MACHINE_UID_NAME should be 56a9148abdSDoug Rabson * initialized to point to that gss_OID_desc. 57a9148abdSDoug Rabson */ 58a9148abdSDoug Rabson static gss_OID_desc GSS_C_NT_MACHINE_UID_NAME_storage = 59a9148abdSDoug Rabson {10, (void *)(uintptr_t)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x02"}; 60a9148abdSDoug Rabson gss_OID GSS_C_NT_MACHINE_UID_NAME = &GSS_C_NT_MACHINE_UID_NAME_storage; 61a9148abdSDoug Rabson 62a9148abdSDoug Rabson /* 63a9148abdSDoug Rabson * The implementation must reserve static storage for a 64a9148abdSDoug Rabson * gss_OID_desc object containing the value 65a9148abdSDoug Rabson * {10, (void *)"\x2a\x86\x48\x86\xf7\x12" 66a9148abdSDoug Rabson * "\x01\x02\x01\x03"}, 67a9148abdSDoug Rabson * corresponding to an object-identifier value of 68a9148abdSDoug Rabson * {iso(1) member-body(2) United States(840) mit(113554) 69a9148abdSDoug Rabson * infosys(1) gssapi(2) generic(1) string_uid_name(3)}. 70a9148abdSDoug Rabson * The constant GSS_C_NT_STRING_UID_NAME should be 71a9148abdSDoug Rabson * initialized to point to that gss_OID_desc. 72a9148abdSDoug Rabson */ 73a9148abdSDoug Rabson static gss_OID_desc GSS_C_NT_STRING_UID_NAME_storage = 74a9148abdSDoug Rabson {10, (void *)(uintptr_t)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x03"}; 75a9148abdSDoug Rabson gss_OID GSS_C_NT_STRING_UID_NAME = &GSS_C_NT_STRING_UID_NAME_storage; 76a9148abdSDoug Rabson 77a9148abdSDoug Rabson /* 78a9148abdSDoug Rabson * The implementation must reserve static storage for a 79a9148abdSDoug Rabson * gss_OID_desc object containing the value 80a9148abdSDoug Rabson * {6, (void *)"\x2b\x06\x01\x05\x06\x02"}, 81a9148abdSDoug Rabson * corresponding to an object-identifier value of 82a9148abdSDoug Rabson * {iso(1) org(3) dod(6) internet(1) security(5) 83a9148abdSDoug Rabson * nametypes(6) gss-host-based-services(2)). The constant 84a9148abdSDoug Rabson * GSS_C_NT_HOSTBASED_SERVICE_X should be initialized to point 85a9148abdSDoug Rabson * to that gss_OID_desc. This is a deprecated OID value, and 86a9148abdSDoug Rabson * implementations wishing to support hostbased-service names 87a9148abdSDoug Rabson * should instead use the GSS_C_NT_HOSTBASED_SERVICE OID, 88a9148abdSDoug Rabson * defined below, to identify such names; 89a9148abdSDoug Rabson * GSS_C_NT_HOSTBASED_SERVICE_X should be accepted a synonym 90a9148abdSDoug Rabson * for GSS_C_NT_HOSTBASED_SERVICE when presented as an input 91a9148abdSDoug Rabson * parameter, but should not be emitted by GSS-API 92a9148abdSDoug Rabson * implementations 93a9148abdSDoug Rabson */ 94a9148abdSDoug Rabson static gss_OID_desc GSS_C_NT_HOSTBASED_SERVICE_X_storage = 95a9148abdSDoug Rabson {6, (void *)(uintptr_t)"\x2b\x06\x01\x05\x06\x02"}; 96a9148abdSDoug Rabson gss_OID GSS_C_NT_HOSTBASED_SERVICE_X = &GSS_C_NT_HOSTBASED_SERVICE_X_storage; 97a9148abdSDoug Rabson 98a9148abdSDoug Rabson /* 99a9148abdSDoug Rabson * The implementation must reserve static storage for a 100a9148abdSDoug Rabson * gss_OID_desc object containing the value 101a9148abdSDoug Rabson * {10, (void *)"\x2a\x86\x48\x86\xf7\x12" 102a9148abdSDoug Rabson * "\x01\x02\x01\x04"}, corresponding to an 103a9148abdSDoug Rabson * object-identifier value of {iso(1) member-body(2) 104a9148abdSDoug Rabson * Unites States(840) mit(113554) infosys(1) gssapi(2) 105a9148abdSDoug Rabson * generic(1) service_name(4)}. The constant 106a9148abdSDoug Rabson * GSS_C_NT_HOSTBASED_SERVICE should be initialized 107a9148abdSDoug Rabson * to point to that gss_OID_desc. 108a9148abdSDoug Rabson */ 109a9148abdSDoug Rabson static gss_OID_desc GSS_C_NT_HOSTBASED_SERVICE_storage = 110a9148abdSDoug Rabson {10, (void *)(uintptr_t)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x04"}; 111a9148abdSDoug Rabson gss_OID GSS_C_NT_HOSTBASED_SERVICE = &GSS_C_NT_HOSTBASED_SERVICE_storage; 112a9148abdSDoug Rabson 113a9148abdSDoug Rabson /* 114a9148abdSDoug Rabson * The implementation must reserve static storage for a 115a9148abdSDoug Rabson * gss_OID_desc object containing the value 116a9148abdSDoug Rabson * {6, (void *)"\x2b\x06\01\x05\x06\x03"}, 117a9148abdSDoug Rabson * corresponding to an object identifier value of 118a9148abdSDoug Rabson * {1(iso), 3(org), 6(dod), 1(internet), 5(security), 119a9148abdSDoug Rabson * 6(nametypes), 3(gss-anonymous-name)}. The constant 120a9148abdSDoug Rabson * and GSS_C_NT_ANONYMOUS should be initialized to point 121a9148abdSDoug Rabson * to that gss_OID_desc. 122a9148abdSDoug Rabson */ 123a9148abdSDoug Rabson static gss_OID_desc GSS_C_NT_ANONYMOUS_storage = 124a9148abdSDoug Rabson {6, (void *)(uintptr_t)"\x2b\x06\01\x05\x06\x03"}; 125a9148abdSDoug Rabson gss_OID GSS_C_NT_ANONYMOUS = &GSS_C_NT_ANONYMOUS_storage; 126a9148abdSDoug Rabson 127a9148abdSDoug Rabson /* 128a9148abdSDoug Rabson * The implementation must reserve static storage for a 129a9148abdSDoug Rabson * gss_OID_desc object containing the value 130a9148abdSDoug Rabson * {6, (void *)"\x2b\x06\x01\x05\x06\x04"}, 131a9148abdSDoug Rabson * corresponding to an object-identifier value of 132a9148abdSDoug Rabson * {1(iso), 3(org), 6(dod), 1(internet), 5(security), 133a9148abdSDoug Rabson * 6(nametypes), 4(gss-api-exported-name)}. The constant 134a9148abdSDoug Rabson * GSS_C_NT_EXPORT_NAME should be initialized to point 135a9148abdSDoug Rabson * to that gss_OID_desc. 136a9148abdSDoug Rabson */ 137a9148abdSDoug Rabson static gss_OID_desc GSS_C_NT_EXPORT_NAME_storage = 138a9148abdSDoug Rabson {6, (void *)(uintptr_t)"\x2b\x06\x01\x05\x06\x04"}; 139a9148abdSDoug Rabson gss_OID GSS_C_NT_EXPORT_NAME = &GSS_C_NT_EXPORT_NAME_storage; 140a9148abdSDoug Rabson 141a9148abdSDoug Rabson /* 142a9148abdSDoug Rabson * This name form shall be represented by the Object Identifier {iso(1) 143a9148abdSDoug Rabson * member-body(2) United States(840) mit(113554) infosys(1) gssapi(2) 144a9148abdSDoug Rabson * krb5(2) krb5_name(1)}. The recommended symbolic name for this type 145a9148abdSDoug Rabson * is "GSS_KRB5_NT_PRINCIPAL_NAME". 146a9148abdSDoug Rabson */ 147a9148abdSDoug Rabson static gss_OID_desc GSS_KRB5_NT_PRINCIPAL_NAME_storage = 148a9148abdSDoug Rabson {10, (void *)(uintptr_t)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x02\x01"}; 149a9148abdSDoug Rabson gss_OID GSS_KRB5_NT_PRINCIPAL_NAME = &GSS_KRB5_NT_PRINCIPAL_NAME_storage; 150a9148abdSDoug Rabson 151a9148abdSDoug Rabson /* 152a9148abdSDoug Rabson * This name form shall be represented by the Object Identifier {iso(1) 153a9148abdSDoug Rabson * member-body(2) United States(840) mit(113554) infosys(1) gssapi(2) 154a9148abdSDoug Rabson * generic(1) user_name(1)}. The recommended symbolic name for this 155a9148abdSDoug Rabson * type is "GSS_KRB5_NT_USER_NAME". 156a9148abdSDoug Rabson */ 157a9148abdSDoug Rabson gss_OID GSS_KRB5_NT_USER_NAME = &GSS_C_NT_USER_NAME_storage; 158a9148abdSDoug Rabson 159a9148abdSDoug Rabson /* 160a9148abdSDoug Rabson * This name form shall be represented by the Object Identifier {iso(1) 161a9148abdSDoug Rabson * member-body(2) United States(840) mit(113554) infosys(1) gssapi(2) 162a9148abdSDoug Rabson * generic(1) machine_uid_name(2)}. The recommended symbolic name for 163a9148abdSDoug Rabson * this type is "GSS_KRB5_NT_MACHINE_UID_NAME". 164a9148abdSDoug Rabson */ 165a9148abdSDoug Rabson gss_OID GSS_KRB5_NT_MACHINE_UID_NAME = &GSS_C_NT_MACHINE_UID_NAME_storage; 166a9148abdSDoug Rabson 167a9148abdSDoug Rabson /* 168a9148abdSDoug Rabson * This name form shall be represented by the Object Identifier {iso(1) 169a9148abdSDoug Rabson * member-body(2) United States(840) mit(113554) infosys(1) gssapi(2) 170a9148abdSDoug Rabson * generic(1) string_uid_name(3)}. The recommended symbolic name for 171a9148abdSDoug Rabson * this type is "GSS_KRB5_NT_STRING_UID_NAME". 172a9148abdSDoug Rabson */ 173a9148abdSDoug Rabson gss_OID GSS_KRB5_NT_STRING_UID_NAME = &GSS_C_NT_STRING_UID_NAME_storage; 174