-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgss_argm.h
More file actions
394 lines (280 loc) · 12.5 KB
/
gss_argm.h
File metadata and controls
394 lines (280 loc) · 12.5 KB
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
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
/************************************************************************
* $Id: //tools/src/freeware/gsskrb5/gss_argm.h#1 $
************************************************************************
*
* Copyright (c) 1997-2000 SAP AG. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. All advertising materials mentioning features or use of this
* software must display the following acknowledgment:
* "This product includes software developed by SAP AG"
*
* 4. The name "SAP AG" must not be used to endorse or promote products
* derived from this software without prior written permission.
* For written permission, please contact www.press@sap.com
*
* 5. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by SAP AG"
*
* THIS SOFTWARE IS PROVIDED BY SAP AG ``AS IS'' AND ANY EXPRESSED
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. SAP AG SHALL BE LIABLE FOR ANY DAMAGES
* ARISING OUT OF THE USE OF THIS SOFTWARE ONLY IF CAUSED BY SAP AG'S
* INTENT OR GROSS NEGLIGENCE. IN CASE SAP AG IS LIABLE UNDER THIS
* AGREEMENT FOR DAMAGES CAUSED BY SAP AG'S GROSS NEGLIGENCE SAP AG
* FURTHER SHALL NOT BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT, AND SHALL NOT BE LIABLE IN EXCESS OF THE AMOUNT OF
* DAMAGES TYPICALLY FORESEEABLE FOR SAP AG, WHICH SHALL IN NO EVENT
* EXCEED US$ 500.000.-
*
************************************************************************/
#ifndef _GSS_ARGM_H_
# define _GSS_ARGM_H_
/************************************************************************/
/* */
/* Argument vectors for GSS-API calls in MACROs */
/* for consistency of function declarators and function pointers */
/* */
/************************************************************************/
/*
* GSS-API Version 1 functionality (RFC 1508 & 1509 )
*/
#define ARG8_ACQUIRE_CRED \
OM_uint32 FAR * , /* minor_status */ \
gss_name_t , /* desired_name */ \
OM_uint32 , /* time_req */ \
gss_OID_set , /* desired_mechs */ \
gss_cred_usage_t , /* cred_usage */ \
gss_cred_id_t FAR * , /* output_cred_handle */ \
gss_OID_set FAR * , /* actual_mechs */ \
OM_uint32 FAR * /* time_rec */
#define ARG2_RELEASE_CRED \
OM_uint32 FAR * , /* minor_status */ \
gss_cred_id_t FAR * /* cred_handle */
#define ARG13_INIT_SEC_CONTEXT \
OM_uint32 FAR * , /* minor_status */ \
gss_cred_id_t , /* initiator_cred_handle */ \
gss_ctx_id_t FAR * , /* context_handle */ \
gss_name_t , /* target_name */ \
gss_OID , /* mech_type */ \
OM_uint32 , /* req_flags */ \
OM_uint32 , /* time_req */ \
gss_channel_bindings_t , /* input_chan_bindings */ \
gss_buffer_t , /* input_token */ \
gss_OID FAR * , /* actual_mech_type */ \
gss_buffer_t , /* output_token */ \
OM_uint32 FAR * , /* ret_flags */ \
OM_uint32 FAR * /* time_rec */
#define ARG11_ACCEPT_SEC_CONTEXT \
OM_uint32 FAR * , /* minor_status */ \
gss_ctx_id_t FAR * , /* context_handle */ \
gss_cred_id_t , /* acceptor_cred_handle */ \
gss_buffer_t , /* input_token_buffer */ \
gss_channel_bindings_t , /* input_chan_bindings */ \
gss_name_t FAR * , /* src_name */ \
gss_OID FAR * , /* mech_type */ \
gss_buffer_t , /* output_token */ \
OM_uint32 FAR * , /* ret_flags */ \
OM_uint32 FAR * , /* time_rec */ \
gss_cred_id_t FAR * /* delegated_cred_handle */
#define ARG3_PROCESS_CONTEXT_TOKEN \
OM_uint32 FAR * , /* minor_status */ \
gss_ctx_id_t , /* context_handle */ \
gss_buffer_t /* token_buffer */
#define ARG3_DELETE_SEC_CONTEXT \
OM_uint32 FAR * , /* minor_status */ \
gss_ctx_id_t FAR * , /* context_handle */ \
gss_buffer_t /* output_token */
#define ARG3_CONTEXT_TIME \
OM_uint32 FAR * , /* minor_status */ \
gss_ctx_id_t , /* context_handle */ \
OM_uint32 FAR * /* time_rec */
/* v2 name for gss_sign() */
#define ARG5_GET_MIC \
OM_uint32 FAR * , /* minor_status */ \
gss_ctx_id_t , /* context_handle */ \
gss_qop_t , /* qop_req */ \
gss_buffer_t , /* message_buffer */ \
gss_buffer_t /* message_token */
/* v2 name for gss_verify() */
#define ARG5_VERIFY_MIC \
OM_uint32 FAR * , /* minor_status */ \
gss_ctx_id_t , /* context_handle */ \
gss_buffer_t , /* message_buffer */ \
gss_buffer_t , /* token_buffer */ \
gss_qop_t FAR * /* qop_state */
/* v2 name for gss_seal() */
#define ARG7_WRAP \
OM_uint32 FAR * , /* minor_status */ \
gss_ctx_id_t , /* context_handle */ \
int , /* conf_req_flag */ \
gss_qop_t , /* qop_req */ \
gss_buffer_t , /* input_message_buffer */ \
int FAR * , /* conf_state */ \
gss_buffer_t /* output_message_buffer*/
/* v2 name for gss_unseal() */
#define ARG6_UNWRAP \
OM_uint32 FAR * , /* minor_status */ \
gss_ctx_id_t , /* context_handle */ \
gss_buffer_t , /* input_message_buffer */ \
gss_buffer_t , /* output_message_buffer*/ \
int FAR * , /* conf_state */ \
gss_qop_t FAR * /* qop_state */
#define ARG6_DISPLAY_STATUS \
OM_uint32 FAR * , /* minor_status */ \
OM_uint32 , /* status_value */ \
int , /* status_type */ \
gss_OID , /* mech_type */ \
OM_uint32 FAR * , /* message_context */ \
gss_buffer_t /* status_string */
#define ARG2_INDICATE_MECHS \
OM_uint32 FAR * , /* minor_status */ \
gss_OID_set FAR * /* mech_set */
#define ARG4_COMPARE_NAME \
OM_uint32 FAR * , /* minor_status */ \
gss_name_t , /* name1 */ \
gss_name_t , /* name2 */ \
int FAR * /* name_equal */
#define ARG4_DISPLAY_NAME \
OM_uint32 FAR * , /* minor_status */ \
gss_name_t , /* input_name */ \
gss_buffer_t , /* output_name_buffer */ \
gss_OID FAR * /* output_name_type */
#define ARG4_IMPORT_NAME \
OM_uint32 FAR * , /* minor_status */ \
gss_buffer_t , /* input_name_buffer */ \
gss_OID , /* input_name_type */ \
gss_name_t FAR * /* output_name */
#define ARG2_RELEASE_NAME \
OM_uint32 FAR * , /* minor_status */ \
gss_name_t FAR * /* input_name */
#define ARG2_RELEASE_BUFFER \
OM_uint32 FAR * , /* minor_status */ \
gss_buffer_t /* buffer */
#define ARG2_RELEASE_OID_SET \
OM_uint32 FAR * , /* minor_status */ \
gss_OID_set FAR * /* set */
#define ARG6_INQUIRE_CRED \
OM_uint32 FAR * , /* minor_status */ \
gss_cred_id_t , /* cred_handle */ \
gss_name_t FAR * , /* name */ \
OM_uint32 FAR * , /* lifetime */ \
gss_cred_usage_t FAR * , /* cred_usage */ \
gss_OID_set FAR * /* mechanisms */
/*
* New functionality in GSS-API Version 2
*/
#define ARG11_ADD_CRED \
OM_uint32 FAR * , /* minor_status */ \
gss_cred_id_t , /* input_cred_handle */ \
gss_name_t , /* desired_name */ \
gss_OID , /* desired_mech */ \
gss_cred_usage_t , /* cred_usage */ \
OM_uint32 , /* initiator_time_req */ \
OM_uint32 , /* acceptor_time_req */ \
gss_cred_id_t FAR * , /* output_cred_handle */ \
gss_OID_set FAR * , /* actual_mechs */ \
OM_uint32 FAR * , /* initiator_time_rec */ \
OM_uint32 FAR * /* acceptor_time_rec */
#define ARG7_INQUIRE_CRED_BY_MECH \
OM_uint32 FAR * , /* minor_status */ \
gss_cred_id_t , /* cred_handle */ \
gss_OID , /* mech_type */ \
gss_name_t FAR * , /* name */ \
OM_uint32 FAR * , /* initiator_lifetime */ \
OM_uint32 FAR * , /* acceptor_lifetime */ \
gss_cred_usage_t FAR * /* cred_usage */
#define ARG9_INQUIRE_CONTEXT \
OM_uint32 FAR * , /* minor_status */ \
gss_ctx_id_t , /* context_handle */ \
gss_name_t FAR * , /* initiator_name */ \
gss_name_t FAR * , /* acceptor_name */ \
OM_uint32 FAR * , /* lifetime_rec */ \
gss_OID FAR * , /* mech_type */ \
OM_uint32 FAR * , /* ret_flags */ \
int FAR * , /* locally_initiated */ \
int FAR * /* open */
#define ARG6_WRAP_SIZE_LIMIT \
OM_uint32 FAR * , /* minor_status */ \
gss_ctx_id_t , /* context handle */ \
int , /* conf_req_flag */ \
gss_qop_t , /* qop_req */ \
OM_uint32 , /* requested output size*/ \
OM_uint32 FAR * /* maximum input size */
#define ARG3_EXPORT_SEC_CONTEXT \
OM_uint32 FAR * , /* minor_status */ \
gss_ctx_id_t FAR * , /* context_handle */ \
gss_buffer_t /* interprocess_token */
#define ARG3_IMPORT_SEC_CONTEXT \
OM_uint32 FAR * , /* minor_status */ \
gss_buffer_t , /* interprocess_token */ \
gss_ctx_id_t FAR * /* context_handle */
#define ARG2_CREATE_EMPTY_OID_SET \
OM_uint32 FAR * , /* minor_status */ \
gss_OID_set FAR * /* oid_set */
#define ARG3_ADD_OID_SET_MEMBER \
OM_uint32 FAR * , /* minor_status */ \
gss_OID , /* member_oid */ \
gss_OID_set FAR * /* oid_set */
#define ARG4_TEST_OID_SET_MEMBER \
OM_uint32 FAR * , /* minor_status */ \
gss_OID , /* member */ \
gss_OID_set , /* set */ \
int FAR * /* present */
#define ARG3_INQUIRE_NAMES_FOR_MECH \
OM_uint32 FAR * , /* minor_status */ \
gss_OID , /* mechanism_oid */ \
gss_OID_set FAR * /* name_types */
#define ARG3_INQUIRE_MECHS_FOR_NAME \
OM_uint32 FAR * , /* minor_status */ \
gss_name_t , /* input_name */ \
gss_OID_set FAR * /* mechanism oids */
#define ARG4_CANONICALIZE_NAME \
OM_uint32 FAR * , /* minor_status */ \
gss_name_t , /* input_name */ \
gss_OID , /* mechanism_type */ \
gss_name_t FAR * /* output_name */
#define ARG3_EXPORT_NAME \
OM_uint32 FAR * , /* minor_status */ \
gss_name_t , /* input_name */ \
gss_buffer_t /* output_name_blob */
#define ARG3_DUPLICATE_NAME \
OM_uint32 FAR * , /* minor_status */ \
gss_name_t , /* src_name */ \
gss_name_t FAR * /* dest_name */
/* The following calls were removed from the GSSAPI v2 spec because */
/* they cause confusion about the nature of OIDs (static or dynamically */
/* allocated memory) , which can easily cause problems for shared */
/* library schemes. These calls didn't add real value anyway. */
/* */
/* However, they're implemented/used internally for visualizing */
/* debug output. */
#define ARG3_OID_TO_STR \
OM_uint32 FAR * , /* minor_status */ \
gss_OID , /* oid */ \
gss_buffer_t /* oid_string */
#define ARG3_STR_TO_OID \
OM_uint32 FAR * , /* minor_status */ \
gss_buffer_t , /* oid_string */ \
gss_OID FAR * /* oid */
#define ARG2_RELEASE_OID \
OM_uint32 FAR * , /* minor_status */ \
gss_OID FAR * /* in_oid */
#endif /* _GSS_ARGM_H_ */