2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License, Version 1.0 only 2N/A * (the "License"). You may not use this file except in compliance 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright (c) 1997, by Sun Microsystems, Inc. 2N/A * All rights reserved. 2N/A#
pragma ident "%Z%%M% %I% %E% SMI" 2N/A * These are private mech_dh oid support routines. 2N/A/* See if two oids have the same value */ 2N/A/* Count the number of elements in an oid. Return -1 on badly formed OID */ 2N/A for (i = 0; p < e; i++) {
2N/A /* If the upper bit is set it is part of this element */ 2N/A/* Copy an oid to an allocated gss_OID_desc */ 2N/A /* Allocate the elements of the new OID */ 2N/A /* Set the length */ 2N/A /* And copy the elements */ 2N/A/* Copy an oid, allocating storage */ 2N/A /* Allocate a new OID */ 2N/A /* Clear the destination */ 2N/A /* return failure if no memory for oid */ 2N/A /* Copy the soure oid in to the new OID */ 2N/A /* Set the destination oid */ 2N/A/* Check if an oid is a member of an oid set */ 2N/A /* For each member in the set ... */ 2N/A/* Copy oid set to a newly allocated set */ 2N/A /* Clear the destination */ 2N/A /* Allocate a new container for the set */ 2N/A /* Allocate storage for the elements of the set */ 2N/A /* set the number of elements in the set */ 2N/A /* Add each member of the source set to the new set */ 2N/A /* Free partially allocated set on error */ 2N/A /* Set the destination to the set */ 2N/A * Form a gss_OID_set from an array of gss_OID_desc. 2N/A /* Clear the output set */ 2N/A /* Allocate the set */ 2N/A /* And space for the members */ 2N/A /* Set the set count */ 2N/A /* For each element in the array, addit to the set */ 2N/A /* if we failed recover memory */ 2N/A /* Set the destination */ 2N/A * Given an oid create a GSS_OID_set with a copy of that oid as its 2N/A /* Allocate a set description */ 2N/A /* Add the OID to the set */ 2N/A /* return the set */