gss_unwrap.c revision 331722
11556Srgrimes/*- 21556Srgrimes * Copyright (c) 2005 Doug Rabson 31556Srgrimes * All rights reserved. 41556Srgrimes * 51556Srgrimes * Redistribution and use in source and binary forms, with or without 61556Srgrimes * modification, are permitted provided that the following conditions 71556Srgrimes * are met: 81556Srgrimes * 1. Redistributions of source code must retain the above copyright 91556Srgrimes * notice, this list of conditions and the following disclaimer. 101556Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 111556Srgrimes * notice, this list of conditions and the following disclaimer in the 121556Srgrimes * documentation and/or other materials provided with the distribution. 131556Srgrimes * 141556Srgrimes * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 151556Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 161556Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 171556Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 181556Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 191556Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 201556Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 211556Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 221556Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 231556Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 241556Srgrimes * SUCH DAMAGE. 251556Srgrimes * 261556Srgrimes * $FreeBSD: stable/11/lib/libgssapi/gss_unwrap.c 331722 2018-03-29 02:50:57Z eadler $ 271556Srgrimes */ 281556Srgrimes 291556Srgrimes#include <gssapi/gssapi.h> 301556Srgrimes 311556Srgrimes#include "mech_switch.h" 321556Srgrimes#include "context.h" 331556Srgrimes 341556SrgrimesOM_uint32 351556Srgrimesgss_unwrap(OM_uint32 *minor_status, 361556Srgrimes const gss_ctx_id_t context_handle, 371556Srgrimes const gss_buffer_t input_message_buffer, 3820412Ssteve gss_buffer_t output_message_buffer, 391556Srgrimes int *conf_state, 401556Srgrimes gss_qop_t *qop_state) 411556Srgrimes{ 421556Srgrimes struct _gss_context *ctx = (struct _gss_context *) context_handle; 431556Srgrimes struct _gss_mech_switch *m = ctx->gc_mech; 4435772Scharnier 4536000Scharnier return (m->gm_unwrap(minor_status, ctx->gc_ctx, 4635772Scharnier input_message_buffer, output_message_buffer, 4735772Scharnier conf_state, qop_state)); 4850471Speter} 491556Srgrimes