File: Context.xs

package info (click to toggle)
libgssapi-perl 0.22-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 180 kB
  • ctags: 35
  • sloc: perl: 706; makefile: 53
file content (274 lines) | stat: -rw-r--r-- 6,037 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274

GSSAPI::Context_out
new(class)
	char *	class
    CODE:
	RETVAL = 0;
    OUTPUT:
	RETVAL

void
DESTROY(context)
	GSSAPI::Context_opt	context
    PREINIT:
	OM_uint32		minor;
	OM_uint32		major;
    CODE:
	if (context != NULL) {

	    major = gss_delete_sec_context(&minor, &context, GSS_C_NO_BUFFER);
	    if ( major == GSS_S_FAILURE) {
	       warn("failed gss_delete_sec_context(), GSS_S_FAILURE, module Context.xs");
	    }
	}

GSSAPI::Status
init(context, cred, name, in_mech, in_flags, in_time, binding, in_token, out_mech, out_token, out_flags, out_time)
	GSSAPI::Context_opt	context
	GSSAPI::Cred_opt	cred
	GSSAPI::Name		name
	GSSAPI::OID_opt		in_mech
	OM_uint32		in_flags
	OM_uint32		in_time
	GSSAPI::Binding_opt	binding
	gss_buffer_desc		in_token
    PREINIT:
	GSSAPI__OID		out_mech_real;
	OM_uint32		out_flags_real;
	OM_uint32		out_time_real;
    INPUT:
	GSSAPI::OID_optout	out_mech
	gss_buffer_desc_out	out_token
	OM_uint32_optout	out_flags
	OM_uint32_optout	out_time
    CODE:
	RETVAL.major =
		gss_init_sec_context(&RETVAL.minor, cred, &context, name,
				     in_mech, in_flags, in_time, binding,
				     &in_token, out_mech, &out_token,
				     out_flags, out_time);
    OUTPUT:
	RETVAL
	context
	out_mech
	out_token
	out_flags
	out_time

GSSAPI::Status
accept(context, acc_cred, in_token, binding, out_name, out_mech, out_token, out_flags, out_time, delegated_cred)
	GSSAPI::Context_opt	context
	GSSAPI::Cred_opt	acc_cred
	gss_buffer_desc		in_token
	GSSAPI::Binding_opt	binding
    PREINIT:
	GSSAPI__Name		out_name_real;
	GSSAPI__OID		out_mech_real;
	OM_uint32		out_flags_real;
	OM_uint32		out_time_real;
	GSSAPI__Cred		delegated_cred_real;
    INPUT:
	GSSAPI::Name_optout	out_name
	GSSAPI::OID_optout	out_mech
	gss_buffer_desc_out	out_token
	OM_uint32_optout	out_flags
	OM_uint32_optout	out_time
	GSSAPI::Cred_optout	delegated_cred
    CODE:
	RETVAL.major =
		gss_accept_sec_context(&RETVAL.minor, &context, acc_cred,
				       &in_token, binding, out_name, out_mech,
				       &out_token, out_flags, out_time,
				       delegated_cred);
    OUTPUT:
	RETVAL
	context
	out_name
	out_mech
	out_token
	out_flags
	out_time
	delegated_cred

GSSAPI::Status
delete(context, out_token)
	GSSAPI::Context_opt	context
	gss_buffer_desc_out	out_token
    CODE:
	if (context != NULL) {
	    RETVAL.major = gss_delete_sec_context(&RETVAL.minor, &context,
						  &out_token);
	} else {
	    RETVAL.major = GSS_S_COMPLETE;
	    RETVAL.minor = 0;
	}
    OUTPUT:
	RETVAL
	context
	out_token

GSSAPI::Status
process_token(context, token)
	GSSAPI::Context		context
	gss_buffer_desc		token
    CODE:
	RETVAL.major =
		gss_process_context_token(&RETVAL.minor, context, &token);
    OUTPUT:
	RETVAL

GSSAPI::Status
valid_time_left(context, out_time)
	GSSAPI::Context		context
    PREINIT:
	OM_uint32		out_time_real;
    INPUT:
	OM_uint32_optout	out_time
    CODE:
	RETVAL.major = gss_context_time(&RETVAL.minor, context, out_time);
    OUTPUT:
	RETVAL
	out_time

GSSAPI::Status
wrap_size_limit(context, flags, qop, req_output_size, max_input_size)
	GSSAPI::Context		context
	OM_uint32		flags
	OM_uint32		qop
	OM_uint32		req_output_size
    PREINIT:
	OM_uint32		max_input_size_real;
    INPUT:
	OM_uint32_optout	max_input_size
    CODE:
	RETVAL.major =
		gss_wrap_size_limit(&RETVAL.minor, context, flags, qop,
				    req_output_size, max_input_size);
    OUTPUT:
	RETVAL
	max_input_size


GSSAPI::Status
inquire(context, src_name, targ_name, lifetime, mech, flags, locally_initiated, open)
	GSSAPI::Context		context;
    PREINIT:
	GSSAPI__Name		src_name_real;
	GSSAPI__Name		targ_name_real;
	OM_uint32		lifetime_real;
	GSSAPI__OID		mech_real;
	OM_uint32		flags_real;
	int			locally_initiated_real;
	int			open_real;
    INPUT:
	GSSAPI::Name_optout	src_name
	GSSAPI::Name_optout	targ_name
	OM_uint32_optout	lifetime
	GSSAPI::OID_optout	mech
	OM_uint32_optout	flags
	int_optout		locally_initiated
	int_optout		open
    CODE:
	RETVAL.major =
		gss_inquire_context(&RETVAL.minor, context, src_name,
				    targ_name, lifetime, mech, flags,
				    locally_initiated, open);
    OUTPUT:
	RETVAL
	src_name
	targ_name
	lifetime
	mech
	flags
	locally_initiated
	open

GSSAPI::Status
export(context, token)
	GSSAPI::Context		context
	gss_buffer_desc_out	token
    CODE:
	RETVAL.major = gss_export_sec_context(&RETVAL.minor, &context, &token);
    OUTPUT:
	RETVAL
	context
	token

GSSAPI::Status
import(class, context, token)
	char *			class
	GSSAPI::Context_out	context
	gss_buffer_desc		token
    CODE:
	RETVAL.major = gss_import_sec_context(&RETVAL.minor, &token, &context);
    OUTPUT:
	RETVAL
	context

GSSAPI::Status
get_mic(context, qop, buffer, token)
	GSSAPI::Context		context
	OM_uint32		qop
	gss_buffer_desc		buffer
	gss_buffer_desc_out	token
    CODE:
	RETVAL.major =
		gss_get_mic(&RETVAL.minor, context, qop, &buffer, &token);
    OUTPUT:
	RETVAL
	token

GSSAPI::Status
verify_mic(context, buffer, token, qop)
	GSSAPI::Context		context
	gss_buffer_desc		buffer
	gss_buffer_desc		token
    PREINIT:
	OM_uint32		qop_real;
    INPUT:
	OM_uint32_optout	qop
    CODE:
	RETVAL.major =
		gss_verify_mic(&RETVAL.minor, context, &buffer, &token, qop);
    OUTPUT:
	RETVAL
	qop

GSSAPI::Status
wrap(context, conf_flag, qop, in_buffer, conf_state, out_buffer)
	GSSAPI::Context		context
	int			conf_flag
	OM_uint32		qop
	gss_buffer_desc		in_buffer
    PREINIT:
	int			conf_state_real;
    INPUT:
	int_optout		conf_state
	gss_buffer_desc_out	out_buffer
    CODE:
	RETVAL.major = gss_wrap(&RETVAL.minor, context, conf_flag, qop,
				&in_buffer, conf_state, &out_buffer);
    OUTPUT:
	RETVAL
	conf_state
	out_buffer

GSSAPI::Status
unwrap(context, in_buffer, out_buffer, conf_state, qop)
	GSSAPI::Context		context
	gss_buffer_desc		in_buffer
	gss_buffer_desc_out	out_buffer
    PREINIT:
	int			conf_state_real;
	OM_uint32		qop_real;
    INPUT:
	int_optout		conf_state
	OM_uint32_optout	qop
    CODE:
	RETVAL.major = gss_unwrap(&RETVAL.minor, context, &in_buffer,
				  &out_buffer, conf_state, qop);
    OUTPUT:
	RETVAL
	out_buffer
	conf_state
	qop