2N/A * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 2N/A * Copyright 1995 by the Massachusetts Institute of Technology. 2N/A * All Rights Reserved. 2N/A * Export of this software from the United States of America may 2N/A * require a specific license from the United States Government. 2N/A * It is the responsibility of any person or organization contemplating 2N/A * export to obtain such a license before exporting. 2N/A * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and 2N/A * distribute this software and its documentation for any purpose and 2N/A * without fee is hereby granted, provided that the above copyright 2N/A * notice appear in all copies and that both that copyright notice and 2N/A * this permission notice appear in supporting documentation, and that 2N/A * the name of M.I.T. not be used in advertising or publicity pertaining 2N/A * to distribution of the software without specific, written prior 2N/A * permission. M.I.T. makes no representations about the suitability of 2N/A * this software for any purpose. It is provided "as is" without express 2N/A * or implied warranty. 2N/A * The V2 API says the following! 2N/A * gss_release_oid[()] will recognize any of the GSSAPI's own OID 2N/A * values, and will silently ignore attempts to free these OIDs; 2N/A * for other OIDs it will call the C free() routine for both the OID 2N/A * data and the descriptor. This allows applications to freely mix 2N/A * their own heap allocated OID values with OIDs returned by GSS-API. 2N/A * We use the official OID definitions instead of the unofficial OID 2N/A * defintions. But we continue to support the unofficial OID 2N/A * gss_nt_service_name just in case if some gss applications use 2N/A /* Get an enlarged copy of the array */ 2N/A /* Copy in the old junk */ 2N/A /* Duplicate the input element */ 2N/A /* Success - copy elements */ 2N/A /* Failure - restore old contents of list */ 2N/A * OID<->string routines. These are uuuuugly. 2N/A /* First determine the size of the string */ 2N/A if ((
cp[i] &
0x80) == 0) {
2N/A * If we get here, we've calculated the length of "n n n ... n ". Add 4 2N/A * here for "{ " and "}\0". 2N/A if ((
cp[i] &
0x80) == 0) {
2N/A * This routine will handle 2 types of oid string formats: 2N/A * 1 - { 1 2 3 4 } where the braces are optional 2N/A * 2 - 1.2.3.4 this is an alernative format 2N/A * The first format is mandated by the gss spec. The 2N/A * second format is popular outside of the gss community so 2N/A /* Skip over leading space */ 2N/A * The first two numbers are chewed up by the first octet. 2N/A * Phew! We've come this far, so the syntax is good. 2N/A /* Have to fill in the bytes msb-first */ 2N/A * Copyright 1993 by OpenVision Technologies, Inc. 2N/A * Permission to use, copy, modify, distribute, and sell this software 2N/A * and its documentation for any purpose is hereby granted without fee, 2N/A * provided that the above copyright notice appears in all copies and 2N/A * that both that copyright notice and this permission notice appear in 2N/A * supporting documentation, and that the name of OpenVision not be used 2N/A * in advertising or publicity pertaining to distribution of the software 2N/A * without specific, written prior permission. OpenVision makes no 2N/A * representations about the suitability of this software for any 2N/A * purpose. It is provided "as is" without express or implied warranty. 2N/A * OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 2N/A * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 2N/A * EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR 2N/A * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF 2N/A * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 2N/A * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 2N/A * PERFORMANCE OF THIS SOFTWARE.