2 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
3 * Use is subject to license terms.
7 * Copyright 1993 by OpenVision Technologies, Inc.
9 * Permission to use, copy, modify, distribute, and sell this software
10 * and its documentation for any purpose is hereby granted without fee,
11 * provided that the above copyright notice appears in all copies and
12 * that both that copyright notice and this permission notice appear in
13 * supporting documentation, and that the name of OpenVision not be used
14 * in advertising or publicity pertaining to distribution of the software
15 * without specific, written prior permission. OpenVision makes no
16 * representations about the suitability of this software for any
17 * purpose. It is provided "as is" without express or implied warranty.
19 * OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
20 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
21 * EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
22 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
23 * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
24 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
25 * PERFORMANCE OF THIS SOFTWARE.
28 #include "gssapiP_krb5.h"
31 * $Id: seal.c 16171 2004-03-15 17:45:01Z raeburn $
36 krb5_gss_seal(minor_status
, context_handle
, conf_req_flag
,
37 qop_req
, input_message_buffer
, conf_state
,
43 OM_uint32
*minor_status
;
44 gss_ctx_id_t context_handle
;
47 gss_buffer_t input_message_buffer
;
49 gss_buffer_t output_message_buffer
;
51 OM_uint32 gssd_ctx_verifier
;
54 #ifdef KRB5_NO_PRIVACY
56 * conf_req_flag must be zero;
57 * encryption is disallowed
61 return (GSS_S_FAILURE
);
64 return(kg_seal(minor_status
, context_handle
, conf_req_flag
,
65 qop_req
, input_message_buffer
, conf_state
,
66 output_message_buffer
, KG_TOK_SEAL_MSG
));
71 krb5_gss_wrap(minor_status
, context_handle
, conf_req_flag
,
72 qop_req
, input_message_buffer
, conf_state
,
73 output_message_buffer
)
74 OM_uint32
*minor_status
;
75 gss_ctx_id_t context_handle
;
78 gss_buffer_t input_message_buffer
;
80 gss_buffer_t output_message_buffer
;
82 #ifdef KRB5_NO_PRIVACY
83 return (GSS_S_FAILURE
);
85 return(kg_seal(minor_status
, context_handle
, conf_req_flag
,
86 (int) qop_req
, input_message_buffer
, conf_state
,
87 output_message_buffer
, KG_TOK_WRAP_MSG
));