1226031Sstas/* 2226031Sstas * Copyright (c) 2008 Kungliga Tekniska H��gskolan 3226031Sstas * (Royal Institute of Technology, Stockholm, Sweden). 4226031Sstas * All rights reserved. 5226031Sstas * 6226031Sstas * Redistribution and use in source and binary forms, with or without 7226031Sstas * modification, are permitted provided that the following conditions 8226031Sstas * are met: 9226031Sstas * 10226031Sstas * 1. Redistributions of source code must retain the above copyright 11226031Sstas * notice, this list of conditions and the following disclaimer. 12226031Sstas * 13226031Sstas * 2. Redistributions in binary form must reproduce the above copyright 14226031Sstas * notice, this list of conditions and the following disclaimer in the 15226031Sstas * documentation and/or other materials provided with the distribution. 16226031Sstas * 17226031Sstas * 3. Neither the name of the Institute nor the names of its contributors 18226031Sstas * may be used to endorse or promote products derived from this software 19226031Sstas * without specific prior written permission. 20226031Sstas * 21226031Sstas * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 22226031Sstas * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23226031Sstas * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24226031Sstas * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 25226031Sstas * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26226031Sstas * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27226031Sstas * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28226031Sstas * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29226031Sstas * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30226031Sstas * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31226031Sstas * SUCH DAMAGE. 32226031Sstas */ 33226031Sstas 34226031Sstas#include "gsskrb5_locl.h" 35226031Sstas 36226031Sstas#include <roken.h> 37226031Sstas 38233294Sstas#if 0 39226031SstasOM_uint32 GSSAPI_CALLCONV 40226031Sstas_gk_wrap_iov(OM_uint32 * minor_status, 41226031Sstas gss_ctx_id_t context_handle, 42226031Sstas int conf_req_flag, 43226031Sstas gss_qop_t qop_req, 44226031Sstas int * conf_state, 45226031Sstas gss_iov_buffer_desc *iov, 46226031Sstas int iov_count) 47226031Sstas{ 48226031Sstas const gsskrb5_ctx ctx = (const gsskrb5_ctx) context_handle; 49226031Sstas krb5_context context; 50226031Sstas 51226031Sstas GSSAPI_KRB5_INIT (&context); 52226031Sstas 53226031Sstas if (ctx->more_flags & IS_CFX) 54226031Sstas return _gssapi_wrap_cfx_iov(minor_status, ctx, context, 55226031Sstas conf_req_flag, conf_state, 56226031Sstas iov, iov_count); 57226031Sstas 58226031Sstas return GSS_S_FAILURE; 59226031Sstas} 60226031Sstas 61226031SstasOM_uint32 GSSAPI_CALLCONV 62226031Sstas_gk_unwrap_iov(OM_uint32 *minor_status, 63226031Sstas gss_ctx_id_t context_handle, 64226031Sstas int *conf_state, 65226031Sstas gss_qop_t *qop_state, 66226031Sstas gss_iov_buffer_desc *iov, 67226031Sstas int iov_count) 68226031Sstas{ 69226031Sstas const gsskrb5_ctx ctx = (const gsskrb5_ctx) context_handle; 70226031Sstas krb5_context context; 71226031Sstas 72226031Sstas GSSAPI_KRB5_INIT (&context); 73226031Sstas 74226031Sstas if (ctx->more_flags & IS_CFX) 75226031Sstas return _gssapi_unwrap_cfx_iov(minor_status, ctx, context, 76226031Sstas conf_state, qop_state, iov, iov_count); 77226031Sstas 78226031Sstas return GSS_S_FAILURE; 79226031Sstas} 80233294Sstas#endif 81226031Sstas 82226031SstasOM_uint32 GSSAPI_CALLCONV 83226031Sstas_gk_wrap_iov_length(OM_uint32 * minor_status, 84226031Sstas gss_ctx_id_t context_handle, 85226031Sstas int conf_req_flag, 86226031Sstas gss_qop_t qop_req, 87226031Sstas int *conf_state, 88226031Sstas gss_iov_buffer_desc *iov, 89226031Sstas int iov_count) 90226031Sstas{ 91226031Sstas const gsskrb5_ctx ctx = (const gsskrb5_ctx) context_handle; 92226031Sstas krb5_context context; 93226031Sstas 94226031Sstas GSSAPI_KRB5_INIT (&context); 95226031Sstas 96226031Sstas if (ctx->more_flags & IS_CFX) 97226031Sstas return _gssapi_wrap_iov_length_cfx(minor_status, ctx, context, 98226031Sstas conf_req_flag, qop_req, conf_state, 99226031Sstas iov, iov_count); 100226031Sstas 101226031Sstas return GSS_S_FAILURE; 102226031Sstas} 103