2N/A/*
2N/A * Copyright 2008 by the Massachusetts Institute of Technology.
2N/A * All Rights Reserved.
2N/A *
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 *
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. Furthermore if you modify this software you must label
2N/A * your software as modified software and not distribute it in such a
2N/A * fashion that it might be confused with the original M.I.T. software.
2N/A * 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 *
2N/A */
2N/A/*
2N/A * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
2N/A */
2N/A
2N/A/*
2N/A * glue routine for gss_inquire_sec_context_by_oid
2N/A */
2N/A
2N/A#include "mglueP.h"
2N/A#include "gssapiP_generic.h"
2N/A
2N/A#define gssint_get_mechanism __gss_get_mechanism /* SUNW17PACresync */
2N/A
2N/AOM_uint32
2N/Agss_inquire_sec_context_by_oid (OM_uint32 *minor_status,
2N/A const gss_ctx_id_t context_handle,
2N/A const gss_OID desired_object,
2N/A gss_buffer_set_t *data_set)
2N/A{
2N/A OM_uint32 status;
2N/A gss_union_ctx_id_t ctx;
2N/A gss_mechanism mech;
2N/A
2N/A if (minor_status == NULL)
2N/A return GSS_S_CALL_INACCESSIBLE_WRITE;
2N/A
2N/A if (context_handle == GSS_C_NO_CONTEXT)
2N/A return GSS_S_CALL_INACCESSIBLE_READ | GSS_S_NO_CONTEXT;
2N/A
2N/A /*
2N/A * select the approprate underlying mechanism routine and
2N/A * call it.
2N/A */
2N/A
2N/A ctx = (gss_union_ctx_id_t) context_handle;
2N/A mech = gssint_get_mechanism (ctx->mech_type);
2N/A
2N/A if (mech != NULL) {
2N/A if (mech->gss_inquire_sec_context_by_oid != NULL) {
2N/A status = mech->gss_inquire_sec_context_by_oid(minor_status,
2N/A ctx->internal_ctx_id,
2N/A desired_object,
2N/A data_set);
2N/A if (status != GSS_S_COMPLETE)
2N/A map_error(minor_status, mech);
2N/A } else
2N/A status = GSS_S_BAD_MECH;
2N/A
2N/A return status;
2N/A }
2N/A
2N/A return GSS_S_NO_CONTEXT;
2N/A}
2N/A