xref: /freebsd/sys/kgssapi/kgss_if.m (revision 59c8e88e72633afbc47a4ace0d2170d00d51f7dc)
1#-
2# Copyright (c) 2008 Isilon Inc http://www.isilon.com/
3# Authors: Doug Rabson <dfr@rabson.org>
4# Developed with Red Inc: Alfred Perlstein <alfred@freebsd.org>
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:
9# 1. Redistributions of source code must retain the above copyright
10#    notice, this list of conditions and the following disclaimer.
11# 2. Redistributions in binary form must reproduce the above copyright
12#    notice, this list of conditions and the following disclaimer in the
13#    documentation and/or other materials provided with the distribution.
14#
15# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25# SUCH DAMAGE.
26#
27
28# Interface for the in-kernel part of a GSS-API mechanism
29
30#include <kgssapi/gssapi.h>
31#include "gssd.h"
32
33INTERFACE kgss;
34
35METHOD void init {
36	gss_ctx_id_t ctx;
37};
38
39METHOD OM_uint32 import {
40	gss_ctx_id_t ctx;
41	enum sec_context_format format;
42	const gss_buffer_t context_token;
43};
44
45METHOD void delete {
46	gss_ctx_id_t ctx;
47	gss_buffer_t output_token;
48};
49
50METHOD gss_OID mech_type {
51	gss_ctx_id_t ctx;
52};
53
54METHOD OM_uint32 get_mic {
55	gss_ctx_id_t ctx;
56	OM_uint32 *minor_status;
57	gss_qop_t qop_req;
58	struct mbuf *message_buffer;
59	struct mbuf **message_token;
60};
61
62METHOD OM_uint32 verify_mic {
63	gss_ctx_id_t ctx;
64	OM_uint32 *minor_status;
65	struct mbuf *message_buffer;
66	struct mbuf *token_buffer;
67	gss_qop_t *qop_state;
68};
69
70METHOD OM_uint32 wrap {
71	gss_ctx_id_t ctx;
72	OM_uint32 *minor_status;
73	int conf_req_flag;
74	gss_qop_t qop_req;
75	struct mbuf **message_buffer;
76	int *conf_state;
77};
78
79METHOD OM_uint32 unwrap {
80	gss_ctx_id_t ctx;
81	OM_uint32 *minor_status;
82	struct mbuf **message_buffer;
83	int *conf_state;
84	gss_qop_t *qop_state;
85};
86
87METHOD OM_uint32 wrap_size_limit {
88	gss_ctx_id_t ctx;
89	OM_uint32 *minor_status;
90	int conf_req_flag;
91	gss_qop_t qop_req;
92	OM_uint32 req_ouput_size;
93	OM_uint32 *max_input_size;
94}
95