2362N/A * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A/* Constants for indicating what type of info is needed for inqueries */ 0N/A * Class: sun_security_jgss_wrapper_GSSLibStub 0N/A /* initialize global function table */ 0N/A * Class: sun_security_jgss_wrapper_GSSLibStub 0N/A * Method: getMechPtr 0N/A * Utility routine which creates a gss_channel_bindings_t structure 0N/A * using the specified org.ietf.jgss.ChannelBinding object. 0N/A /* set up initiator address */ 0N/A /* set up acceptor address */ 0N/A /* set up application data */ 0N/A * Utility routine which releases the specified gss_channel_bindings_t 0N/A /* release initiator address */ 0N/A /* release acceptor address */ 0N/A /* release application data */ 0N/A * Utility routine for storing the supplementary information 0N/A * into the specified org.ietf.jgss.MessageProp object. 0N/A * Class: sun_security_jgss_wrapper_GSSLibStub 0N/A * Method: indicateMechs 0N/A * Class: sun_security_jgss_wrapper_GSSLibStub 0N/A * Method: inquireNamesForMech 0N/A /* gss_inquire_names_for_mech(...) => N/A */ 0N/A /* release intermediate buffers */ 0N/A * Class: sun_security_jgss_wrapper_GSSLibStub 0N/A * Method: releaseName 0N/A /* gss_release_name(...) => GSS_S_BAD_NAME */ 0N/A * Class: sun_security_jgss_wrapper_GSSLibStub 0N/A * Method: importName 0N/A /* gss_import_name(...) => GSS_S_BAD_NAMETYPE, GSS_S_BAD_NAME, 0N/A /* release intermediate buffers */ 0N/A * Class: sun_security_jgss_wrapper_GSSLibStub 0N/A * Method: compareName 0N/A /* gss_compare_name(...) => GSS_S_BAD_NAMETYPE, GSS_S_BAD_NAME(!) */ 0N/A * Class: sun_security_jgss_wrapper_GSSLibStub 0N/A * Method: canonicalizeName 0N/A /* gss_canonicalize_name(...) may return GSS_S_BAD_NAMETYPE, 0N/A GSS_S_BAD_NAME, GSS_S_BAD_MECH */ 0N/A /* release intermediate buffers */ 0N/A * Class: sun_security_jgss_wrapper_GSSLibStub 0N/A * Method: exportName 0N/A /* gss_export_name(...) => GSS_S_NAME_NOT_MN, GSS_S_BAD_NAMETYPE, 0N/A /* canonicalize the internal name to MN and retry */ 0N/A debug(
env,
"[GSSLibStub_exportName] canonicalize and re-try");
0N/A /* return immediately if an exception has occurred */ 0N/A /* return immediately if an exception has occurred */ 0N/A /* release intermediate buffers */ 0N/A * Class: sun_security_jgss_wrapper_GSSLibStub 0N/A * Method: displayName 0N/A /* gss_display_name(...) => GSS_S_BAD_NAME */ 0N/A /* release intermediate buffers */ 0N/A /* return immediately if an exception has occurred */ 0N/A * Class: sun_security_jgss_wrapper_GSSLibStub 0N/A * Method: acquireCred 0N/A /* gss_acquire_cred(...) => GSS_S_BAD_MECH, GSS_S_BAD_NAMETYPE, 0N/A GSS_S_BAD_NAME, GSS_S_CREDENTIALS_EXPIRED, GSS_S_NO_CRED */ 0N/A /* release intermediate buffers */ 0N/A * Class: sun_security_jgss_wrapper_GSSLibStub 0N/A * Method: releaseCred 0N/A /* gss_release_cred(...) => GSS_S_NO_CRED(!) */ 0N/A * Utility routine for obtaining info about a credential. 0N/A /* gss_inquire_cred(...) => GSS_S_DEFECTIVE_CREDENTIAL(!), 0N/A GSS_S_CREDENTIALS_EXPIRED(!), GSS_S_NO_CRED(!) */ 0N/A /* release intermediate buffers */ 0N/A /* ignore GSS_S_CREDENTIALS_EXPIRED for query */ 0N/A /* twik since Java API throws BAD_MECH instead of NO_CRED */ 0N/A * Class: sun_security_jgss_wrapper_GSSLibStub 0N/A * Method: getCredName 0N/A /* return immediately if an exception has occurred */ 0N/A * Class: sun_security_jgss_wrapper_GSSLibStub 0N/A * Method: getCredTime 0N/A /* return immediately if an exception has occurred */ 0N/A * Class: sun_security_jgss_wrapper_GSSLibStub 0N/A * Method: getCredUsage 0N/A /* return immediately if an exception has occurred */ 0N/A * Class: sun_security_jgss_wrapper_GSSLibStub 0N/A * Method: importContext 0N/A /* gss_import_sec_context(...) => GSS_S_NO_CONTEXT, GSS_S_DEFECTIVE_TOKEN, 0N/A GSS_S_UNAVAILABLE, GSS_S_UNAUTHORIZED */ 0N/A /* release intermediate buffers */ 0N/A /* return immediately if an exception has occurred */ 0N/A /* now that the context has been imported, proceed to find out 0N/A /* return immediately if an exception has occurred */ 0N/A /* mech match - return the context object */ 0N/A /* mech mismatch - clean up then return null */ 0N/A "[GSSLibStub_importContext] cleanup");
0N/A * Class: sun_security_jgss_wrapper_GSSLibStub 0N/A * Method: initContext 0N/A/* UNCOMMENT after SEAM bug#6287358 is backported to S10 0N/A "[GSSLibStub_initContext] before: pCred=%ld, pContext=%ld",
0N/A /* gss_init_sec_context(...) => GSS_S_CONTINUE_NEEDED(!), 0N/A GSS_S_DEFECTIVE_TOKEN, GSS_S_NO_CRED, GSS_S_DEFECTIVE_CREDENTIAL(!), 0N/A GSS_S_CREDENTIALS_EXPIRED, GSS_S_BAD_BINDINGS, GSS_S_BAD_MIC, 0N/A GSS_S_OLD_TOKEN, GSS_S_DUPLICATE_TOKEN, GSS_S_NO_CONTEXT(!), 0N/A GSS_S_BAD_NAMETYPE, GSS_S_BAD_NAME(!), GSS_S_BAD_MECH */ 0N/A /* update member values if needed */ 0N/A debug(
env,
"[GSSLibStub_initContext] context established");
0N/A/* UNCOMMENT after SEAM bug#6287358 is backported to S10 0N/A jMech = getJavaOID(env, aMech); 0N/A (*env)->SetObjectField(env, jcontextSpi, 0N/A FID_NativeGSSContext_actualMech, jMech); 0N/A debug(
env,
"[GSSLibStub_initContext] context not established");
0N/A /* release intermediate buffers */ 0N/A * Class: sun_security_jgss_wrapper_GSSLibStub 0N/A * Method: acceptContext 0N/A "[GSSLibStub_acceptContext] before: pCred=%ld, pContext=%ld",
0N/A /* gss_accept_sec_context(...) => GSS_S_CONTINUE_NEEDED(!), 0N/A GSS_S_DEFECTIVE_TOKEN, GSS_S_DEFECTIVE_CREDENTIAL(!), 0N/A GSS_S_NO_CRED, GSS_S_CREDENTIALS_EXPIRED, GSS_S_BAD_BINDINGS, 0N/A GSS_S_NO_CONTEXT(!), GSS_S_BAD_MIC, GSS_S_OLD_TOKEN, 0N/A GSS_S_DUPLICATE_TOKEN, GSS_S_BAD_MECH */ 0N/A "[GSSLibStub_acceptContext] after: pCred=%ld, pContext=%ld, pDelegCred=%ld",
0N/A /* update member values if needed */ 0N/A // WORKAROUND for a Heimdal bug 0N/A /* return immediately if an exception has occurred */ 0N/A /* return immediately if an exception has occurred */ 0N/A debug(
env,
"[GSSLibStub_acceptContext] context established");
0N/A /* return immediately if an exception has occurred */ 0N/A debug(
env,
"[GSSLibStub_acceptContext] context not established");
0N/A /* release intermediate buffers */ 0N/A * Class: sun_security_jgss_wrapper_GSSLibStub 0N/A * Method: inquireContext 0N/A /* gss_inquire_context(...) => GSS_S_NO_CONTEXT(!) */ 0N/A /* update member values if needed */ 0N/A /* release intermediate buffers */ 0N/A * Class: sun_security_jgss_wrapper_GSSLibStub 0N/A * Method: getContextMech 0N/A /* return immediately if an exception has occurred */ 0N/A * Class: sun_security_jgss_wrapper_GSSLibStub 0N/A * Method: getContextName 0N/A /* return immediately if an exception has occurred */ 0N/A * Class: sun_security_jgss_wrapper_GSSLibStub 0N/A * Method: getContextTime 0N/A /* gss_context_time(...) => GSS_S_CONTEXT_EXPIRED(!), 0N/A GSS_S_NO_CONTEXT(!) */ 0N/A * Class: sun_security_jgss_wrapper_GSSLibStub 0N/A * Method: deleteContext 0N/A /* gss_delete_sec_context(...) => GSS_S_NO_CONTEXT(!) */ 0N/A * Class: sun_security_jgss_wrapper_GSSLibStub 0N/A * Method: wrapSizeLimit 0N/A * Signature: (JIII)I 0N/A // Check context handle?? 0N/A /* gss_wrap_size_limit(...) => GSS_S_NO_CONTEXT(!), GSS_S_CONTEXT_EXPIRED, 0N/A * Class: sun_security_jgss_wrapper_GSSLibStub 0N/A * Method: exportContext 0N/A /* gss_export_sec_context(...) => GSS_S_CONTEXT_EXPIRED, 0N/A GSS_S_NO_CONTEXT, GSS_S_UNAVAILABLE */ 0N/A /* release intermediate buffers */ 0N/A * Class: sun_security_jgss_wrapper_GSSLibStub 0N/A * Signature: (JI[B)[B 0N/A /* gss_get_mic(...) => GSS_S_CONTEXT_EXPIRED, GSS_S_NO_CONTEXT(!), 0N/A /* release intermediate buffers */ 0N/A * Class: sun_security_jgss_wrapper_GSSLibStub 0N/A "[GSSLibStub_verifyMic]");
0N/A /* gss_verify_mic(...) => GSS_S_DEFECTIVE_TOKEN, GSS_S_BAD_MIC, 0N/A GSS_S_CONTEXT_EXPIRED, GSS_S_DUPLICATE_TOKEN(!), GSS_S_OLD_TOKEN(!), 0N/A GSS_S_UNSEQ_TOKEN(!), GSS_S_GAP_TOKEN(!), GSS_S_NO_CONTEXT(!) */ 0N/A /* release intermediate buffers */ 0N/A * Class: sun_security_jgss_wrapper_GSSLibStub 0N/A /* gss_wrap(...) => GSS_S_CONTEXT_EXPIRED, GSS_S_NO_CONTEXT(!), 0N/A /* release intermediate buffers */ 0N/A * Class: sun_security_jgss_wrapper_GSSLibStub 0N/A /* gss_unwrap(...) => GSS_S_DEFECTIVE_TOKEN, GSS_S_BAD_MIC, 0N/A GSS_S_CONTEXT_EXPIRED, GSS_S_DUPLICATE_TOKEN(!), GSS_S_OLD_TOKEN(!), 0N/A GSS_S_UNSEQ_TOKEN(!), GSS_S_GAP_TOKEN(!), GSS_S_NO_CONTEXT(!) */ 0N/A /* update the message prop with relevant info */ 0N/A /* release intermediate buffers */