2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 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) 1999, 2011, Oracle and/or its affiliates. All rights reserved. 2N/A * glue routine for gss_init_sec_context 2N/A /* Initialize outputs. */ 2N/A /* Validate arguments. */ 2N/A * obtain the gss mechanism information for the requested 2N/A * mechanism. If mech_type is NULL, set it to the resultant 2N/A * If target_name is mechanism_specific, then it must match the 2N/A * mech_type that we're about to use. Otherwise, do an import on 2N/A * the external_name form of the target name. 2N/A * if context_handle is GSS_C_NO_CONTEXT, allocate a union context 2N/A * descriptor to hold the mech type information as well as the 2N/A * underlying mechanism context handle. Otherwise, cast the 2N/A * value of *context_handle to the union context variable. 2N/A /* copy the supplied context handle */ 2N/A * get the appropriate cred handle from the union cred struct. 2N/A * defaults to GSS_C_NO_CREDENTIAL if there is no cred, which will 2N/A * use the default credential. 2N/A * now call the approprate underlying mechanism routine 2N/A * the spec says (the preferred) method is to delete all 2N/A * context info on the first call to init, and on all 2N/A * subsequent calls make the caller responsible for 2N/A * calling gss_delete_sec_context