File: gss_mech_choose.c

package info (click to toggle)
globus-gssapi-gsi 7.5-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 2,100 kB
  • ctags: 888
  • sloc: ansic: 13,335; sh: 8,562; makefile: 358
file content (858 lines) | stat: -rw-r--r-- 21,440 bytes parent folder | download
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
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
/*
 * Copyright 1999-2006 University of Chicago
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**********************************************************************

gss_mech_choose.c

Description:
	Untill the mech_glue is working for WIN32, this routine
	can be used inplace of the gssapi32.dll. It will
	look for gssapi32k.dll and gssapi32g.dll, the Kerberos 5
	and Globus gssapi implementations, and prompt the user
	as to which to use for this application. 

	Designed to work with SecureCRT 2.4 and FTP
	where the user needes to use Kerberos and Globus in a mixed
	environment. 

CVS Information:

    $Source: /home/globdev/CVS/globus-packages/gsi/gssapi/source/library/gss_mech_choose.c,v $
    $Date: 2006/01/19 05:56:09 $
    $Revision: 1.3 $
    $Author: mlink $

**********************************************************************/

static char *rcsid = "$Header: /home/globdev/CVS/globus-packages/gsi/gssapi/source/library/gss_mech_choose.c,v 1.3 2006/01/19 05:56:09 mlink Exp $";

/**********************************************************************
                             Include header files
**********************************************************************/
#include <stdio.h>
#include <windows.h>

#include "gssapi.h"

#define COM_CODE(name) static OM_uint32 (__stdcall *function)() = NULL; \
	if (!function) function_init(name, &function);
	

/**********************************************************************
                               Type definitions
**********************************************************************/

/**********************************************************************
                          Module specific prototypes
**********************************************************************/

static void
function_init(char * name, OM_uint32 (__stdcall **pfunction)());

static OM_uint32 __stdcall
function_error();



/**********************************************************************
                       Define module specific variables
**********************************************************************/
/* we define the oid values here which are required */

static gss_OID_desc  GSS_C_NT_USER_NAME_desc = 
		{10, (void *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x01"};
gss_OID GSS_C_NT_USER_NAME = &GSS_C_NT_USER_NAME_desc;

static gss_OID_desc   GSS_C_NT_MACHINE_UID_NAME_desc = 
		{10, (void *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x02"};
gss_OID GSS_C_NT_MACHINE_UID_NAME = &GSS_C_NT_MACHINE_UID_NAME_desc;

static gss_OID_desc  GSS_C_NT_STRING_UID_NAME_desc = 
		{10, (void *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x03"};
gss_OID GSS_C_NT_STRING_UID_NAME = &GSS_C_NT_STRING_UID_NAME_desc;

static gss_OID_desc  GSS_C_NT_HOSTBASED_SERVICE_X_desc = 
		{6, (void *)"\x2b\x06\x01\x05\x06\x02"};
gss_OID GSS_C_NT_HOSTBASED_SERVICE_X = &GSS_C_NT_HOSTBASED_SERVICE_X_desc;

static gss_OID_desc  GSS_C_NT_HOSTBASED_SERVICE_desc = 
		{10, (void *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x04"};
gss_OID GSS_C_NT_HOSTBASED_SERVICE = &GSS_C_NT_HOSTBASED_SERVICE_desc;

static gss_OID_desc  GSS_C_NT_ANONYMOUS_desc = 
		{6, (void *)"\x2b\x06\01\x05\x06\x03"};
gss_OID GSS_C_NT_ANONYMOUS = &GSS_C_NT_ANONYMOUS_desc;

static gss_OID_desc  GSS_C_NT_EXPORT_NAME_desc = 
		{6, (void *)"\x2b\x06\x01\x05\x06\x04"};
gss_OID GSS_C_NT_EXPORT_NAME = &GSS_C_NT_EXPORT_NAME_desc;

/*
 * for backwards compatability, also define the V1 constant OID
 * pointing the V2 OIDs. This is done mostly for DLL compatability
 */

gss_OID gss_nt_user_name =        &GSS_C_NT_USER_NAME_desc;
gss_OID gss_nt_machine_uid_name = &GSS_C_NT_MACHINE_UID_NAME_desc;
gss_OID gss_nt_string_uid_name =  &GSS_C_NT_STRING_UID_NAME_desc;
gss_OID gss_nt_service_name = 	  &GSS_C_NT_HOSTBASED_SERVICE_desc;


/* handle of the real gssapi32.dll */
HMODULE gssapi_handle = NULL;

/**************************************************************************************
**************************************************************************************/
static OM_uint32 __stdcall
function_error()
{
    MessageBox(0,"Entry not in the gssapi","GSIGSS32.DLL",IDOK);
    return GSS_S_FAILURE;

}
/**************************************************************************************
**************************************************************************************/static void 
function_init(char * name, OM_uint32 (__stdcall **pfunction)())
{
	long err;
	char buf[256];
	
	if (!gssapi_handle)
	{
		int result = 0;
		HMODULE module_gsi = NULL;
		HMODULE module_k5  = NULL;
		/*
		 * find out if we have two gssapi implementations
		 * Use simple message box, to ask which one
		 * as this does not require a lot of programing. 
		 */
			module_gsi = LoadLibrary("gssapi32gsi.dll");
			module_k5 = LoadLibrary("gssapi32k5.dll");
			if (module_gsi || module_k5)
			{
				if (module_gsi && module_k5)
				{
					 result = MessageBox(0,
"Select which GSSAPI to use:\n\n  YES - Globus GSI\n  NO  - Kerberos V5",
							"GSSAPI32.DLL",
							MB_YESNO | MB_ICONQUESTION | MB_TASKMODAL);
				}
				else 
					if (module_gsi) 
						result = IDYES;
	
				if (result == IDYES)
					gssapi_handle = module_gsi;
				else
					gssapi_handle = module_k5;
			}
			else
			{
				gssapi_handle = NULL;
			}
			
	}
	if (gssapi_handle) 
	{
#ifdef DEBUG
		sprintf(buf,"First call to %s",name);
		MessageBox(0,buf,"GSIGSS32.DLL",IDOK);
#endif
		*pfunction = GetProcAddress(gssapi_handle, name);
	} 
	else
	{
		MessageBox(0,"Could not load gssapi32gsi.dll or gssapi32k5.dll","GSSAPI32.DLL",IDOK);
	}
	if (!*pfunction)
	{	
		err= GetLastError();
		sprintf(buf, "Error trying to resolve %s rc=%ld", name, err);
		MessageBox(0,buf,"GSIGSS32.DLL",IDOK);
		*pfunction = function_error;
	}
}

/**************************************************************************************
**************************************************************************************/

OM_uint32 GSS_CALLCONV gss_acquire_cred
(OM_uint32 *              minor_status ,
 const gss_name_t         desired_name ,
 OM_uint32                time_req ,
 const gss_OID_set        desired_mechs ,
 gss_cred_usage_t         cred_usage ,
 gss_cred_id_t *          output_cred_handle ,
 gss_OID_set *            actual_mechs ,
 OM_uint32 *              time_rec 
 ) 
{
    COM_CODE("gss_acquire_cred")

    return ( (*function)(minor_status,
				 desired_name,
				 time_req,
				 desired_mechs,
				 cred_usage,
				 output_cred_handle,
				 actual_mechs,
				 time_rec));
}


OM_uint32 GSS_CALLCONV gss_release_cred
(OM_uint32 *              minor_status ,
 gss_cred_id_t *          cred_handle 
) 
{ 
    COM_CODE("gss_release_cred")

    return ( (*function)(minor_status,
				 cred_handle));
}

OM_uint32 GSS_CALLCONV gss_init_sec_context
(OM_uint32 *             minor_status ,
 const gss_cred_id_t     initiator_cred_handle ,
 gss_ctx_id_t *          context_handle ,
 const gss_name_t        target_name ,
 const gss_OID           mech_type ,
 OM_uint32               req_flags ,
 OM_uint32               time_req ,
 const gss_channel_bindings_t  input_chan_bindings ,
 const gss_buffer_t      input_token ,
 gss_OID *               actual_mech_type ,
 gss_buffer_t            output_token ,
 OM_uint32 *             ret_flags ,
 OM_uint32 *             time_rec 
) 
{
    COM_CODE("gss_init_sec_context")

    return ( (*function)(minor_status,
				 initiator_cred_handle,
				 context_handle ,
				 target_name ,
				 mech_type,
				 req_flags,
				 time_req,
				 input_chan_bindings,
				 input_token,
				 actual_mech_type,
				 output_token,
				 ret_flags,
				 time_rec));
}


OM_uint32 GSS_CALLCONV gss_accept_sec_context
(OM_uint32 *              minor_status ,
 gss_ctx_id_t *           context_handle ,
 const gss_cred_id_t      acceptor_cred_handle ,
 const gss_buffer_t       input_token_buffer ,
 const gss_channel_bindings_t  input_chan_bindings ,
 gss_name_t *             src_name ,
 gss_OID *                mech_type ,
 gss_buffer_t             output_token ,
 OM_uint32 *              ret_flags ,
 OM_uint32 *              time_rec ,
 gss_cred_id_t *          delegated_cred_handle 
) 
{ 
    COM_CODE("gss_accept_sec_context")

    return ( (*function)(minor_status,
				 context_handle,
				 acceptor_cred_handle,
				 input_token_buffer,
				 input_chan_bindings,
				 src_name,
				 mech_type,
				 output_token,
				 ret_flags,
				 time_rec,
				 delegated_cred_handle));
 }


OM_uint32 GSS_CALLCONV gss_process_context_token
(OM_uint32 *              minor_status ,
 const gss_ctx_id_t       context_handle ,
 const gss_buffer_t       token_buffer 
)
{ 
    COM_CODE("gss_process_context_token")

    return ( (*function)(minor_status,
				 context_handle,
				 token_buffer));
}


OM_uint32 GSS_CALLCONV gss_delete_sec_context
(OM_uint32 *              minor_status ,
 gss_ctx_id_t *           context_handle ,
 gss_buffer_t             output_token 
)
{
    COM_CODE("gss_delete_sec_context")
	
    return ( (*function)(minor_status,
				 context_handle,
				 output_token));
}


OM_uint32 GSS_CALLCONV gss_context_time
(OM_uint32 *              minor_status ,
 const gss_ctx_id_t       context_handle ,
 OM_uint32 *               time_rec 
)
{ 
    COM_CODE("gss_context_time")
    return ( (*function)(minor_status,
				 context_handle,
				 time_rec));
}


OM_uint32 GSS_CALLCONV gss_get_mic
(OM_uint32 *              minor_status ,
 const gss_ctx_id_t       context_handle ,
 gss_qop_t                qop_req ,
 const gss_buffer_t       message_buffer ,
 gss_buffer_t              message_token 
)
{
    COM_CODE("gss_get_mic")

    return ( (*function)(minor_status,
				 context_handle,
				 qop_req,
				 message_buffer,
				 message_token));
}



OM_uint32 GSS_CALLCONV gss_verify_mic
(OM_uint32 *              minor_status ,
 const gss_ctx_id_t       context_handle ,
 const gss_buffer_t       message_buffer ,
 const gss_buffer_t       token_buffer ,
 gss_qop_t *               qop_state 
)
{ 
    
    COM_CODE("gss_verify_mic")

    return ( (*function)(minor_status,
				 context_handle,
				 message_buffer,
				 token_buffer,
				 qop_state));
}



OM_uint32 GSS_CALLCONV gss_wrap
(OM_uint32 *              minor_status ,
 const gss_ctx_id_t       context_handle ,
 int                      conf_req_flag ,
 gss_qop_t                qop_req ,
 const gss_buffer_t       input_message_buffer ,
 int *                    conf_state ,
 gss_buffer_t              output_message_buffer 
) 
{
    COM_CODE("gss_wrap")

    return ( (*function)(minor_status,
				 context_handle,
				 conf_req_flag,
				 qop_req,
				 input_message_buffer,
				 conf_state,
				 output_message_buffer));
}



OM_uint32 GSS_CALLCONV gss_unwrap
(OM_uint32 *              minor_status ,
 const gss_ctx_id_t       context_handle ,
 const gss_buffer_t       input_message_buffer ,
 gss_buffer_t             output_message_buffer ,
 int *                    conf_state ,
 gss_qop_t *               qop_state 
)
{ 
    COM_CODE("gss_unwrap")

    return ( (*function)(minor_status,
				 context_handle,
				 input_message_buffer,
				 output_message_buffer,
				 conf_state,
				 qop_state));
}



OM_uint32 GSS_CALLCONV gss_display_status
(OM_uint32 *              minor_status ,
 OM_uint32                status_value ,
 int                      status_type ,
 const gss_OID            mech_type ,
 OM_uint32 *              message_context ,
 gss_buffer_t              status_string 
) 
{
    COM_CODE("gss_display_status")

    return ( (*function)(minor_status,
				 status_value,
				 status_type,
				 mech_type,
				 message_context,
				 status_string));
}


OM_uint32 GSS_CALLCONV gss_indicate_mechs
(OM_uint32 *              minor_status ,
 gss_OID_set *             mech_set 
)
{ 
    COM_CODE("gss_indicate_mechs")

    return ( (*function)(minor_status,
				 mech_set));
}


OM_uint32 GSS_CALLCONV gss_compare_name
(OM_uint32 *              minor_status ,
 const gss_name_t         name1 ,
 const gss_name_t         name2 ,
 int *                     name_equal 
) 
{ 
    COM_CODE("gss_compare_name")

    return ( (*function)(minor_status,
				 name1,
				 name2,
				 name_equal));
}

 
OM_uint32 GSS_CALLCONV gss_display_name
(OM_uint32 *              minor_status ,
 const gss_name_t         input_name ,
 gss_buffer_t             output_name_buffer ,
 gss_OID *                 output_name_type 
)
{
    COM_CODE("gss_display_name")

    return ( (*function)(minor_status,
				 input_name,
				 output_name_buffer,
				 output_name_type));
}


OM_uint32 GSS_CALLCONV gss_import_name
(OM_uint32 *              minor_status ,
 const gss_buffer_t       input_name_buffer ,
 const gss_OID            input_name_type ,
 gss_name_t *              output_name 
)
{
    COM_CODE("gss_import_name")
    return ( (*function)(minor_status,
				 input_name_buffer,
				 input_name_type,
				 output_name));
}

OM_uint32 GSS_CALLCONV gss_export_name
(OM_uint32  *             minor_status ,
 const gss_name_t         input_name ,
 gss_buffer_t              exported_name 
)
{
    COM_CODE("gss_export_name")

    return ( (*function)(minor_status,
				 input_name,
				 exported_name));
}


OM_uint32 GSS_CALLCONV gss_release_name
(OM_uint32 *              minor_status ,
 gss_name_t *              input_name 
)
{
    COM_CODE("gss_release_name")

    return ( (*function)(minor_status,
				 input_name));
}


OM_uint32 GSS_CALLCONV gss_release_buffer
(OM_uint32 *              minor_status ,
 gss_buffer_t              buffer 
)
{
    COM_CODE("gss_release_buffer")

    return ( (*function)(minor_status,
				 buffer));
}


OM_uint32 GSS_CALLCONV gss_release_oid_set
(OM_uint32 *              minor_status ,
 gss_OID_set *             set 
)
{
    COM_CODE("gss_release_oid_set")

    return ( (*function)(minor_status,
				 set));
}


OM_uint32 GSS_CALLCONV gss_inquire_cred
(OM_uint32 *              minor_status ,
 const gss_cred_id_t      cred_handle ,
 gss_name_t *             name ,
 OM_uint32 *              lifetime ,
 gss_cred_usage_t *       cred_usage ,
 gss_OID_set *             mechanisms 
)
{
    COM_CODE("gss_inquire_cred")
	
    return ( (*function)(minor_status,
				 cred_handle,
				 name,
				 lifetime,
				 cred_usage,
				 mechanisms));
}


OM_uint32 GSS_CALLCONV gss_inquire_context 
(OM_uint32 *              minor_status ,
 const gss_ctx_id_t       context_handle ,
 gss_name_t *             src_name ,
 gss_name_t *             targ_name ,
 OM_uint32 *              lifetime_rec ,
 gss_OID *                mech_type ,
 OM_uint32 *              ctx_flags ,
 int *                    locally_initiated ,
 int *                     open 
)
{
    COM_CODE("gss_inquire_context")
	
    return ( (*function)(minor_status,
				 context_handle,
				 src_name,
				 targ_name,
				 lifetime_rec,
				 mech_type,
				 ctx_flags,
				 locally_initiated,
				 open));
}

 
OM_uint32 GSS_CALLCONV gss_wrap_size_limit 
(OM_uint32 *              minor_status ,
 const gss_ctx_id_t       context_handle ,
 int                      conf_req_flag ,
 gss_qop_t                qop_req ,
 OM_uint32                req_output_size ,
 OM_uint32 *               max_input_size 
)
{
    COM_CODE("gss_wrap_size_limit")

    return ( (*function)(minor_status,
				 context_handle,
				 conf_req_flag,
				 qop_req,
				 req_output_size,
				 max_input_size));
}



OM_uint32 GSS_CALLCONV gss_add_cred 
(OM_uint32 *              minor_status ,
 const gss_cred_id_t      input_cred_handle ,
 const gss_name_t         desired_name ,
 const gss_OID            desired_mech ,
 gss_cred_usage_t         cred_usage ,
 OM_uint32                initiator_time_req ,
 OM_uint32                acceptor_time_req ,
 gss_cred_id_t *          output_cred_handle ,
 gss_OID_set *            actual_mechs ,
 OM_uint32 *              initiator_time_rec ,
 OM_uint32 *               acceptor_time_rec 
)
{
    COM_CODE("gss_add_cred")

    return ( (*function)(minor_status,
				 input_cred_handle,
				 desired_name,
				 desired_mech,
				 cred_usage,
				 initiator_time_req,
				 acceptor_time_req,
				 output_cred_handle,
				 actual_mechs,
				 initiator_time_rec,
				 acceptor_time_req));
}

OM_uint32 GSS_CALLCONV gss_inquire_cred_by_mech 
(OM_uint32 *              minor_status ,
 const gss_cred_id_t      cred_handle ,
 const gss_OID            mech_type ,
 gss_name_t *             name ,
 OM_uint32 *              initiator_lifetime ,
 OM_uint32 *              acceptor_lifetime ,
 gss_cred_usage_t *        cred_usage 
)
{
    COM_CODE("gss_inquire_cred_by_mech")

    return ( (*function)(minor_status,
				 cred_handle,
				 mech_type,
				 name,
				 initiator_lifetime,
				 acceptor_lifetime,
				 cred_usage));
}


OM_uint32 GSS_CALLCONV gss_export_sec_context
(OM_uint32 *              minor_status ,
 gss_ctx_id_t *           context_handle ,
 gss_buffer_t              interprocess_token 
)
{
    COM_CODE("gss_export_sec_context")

    return ( (*function)(minor_status,
				 context_handle,
				 interprocess_token));
}



OM_uint32 GSS_CALLCONV gss_import_sec_context 
(OM_uint32 *              minor_status ,
 const gss_buffer_t       interprocess_token ,
 gss_ctx_id_t *            context_handle 
)
{
    COM_CODE("gss_import_sec_context")

    return ( (*function)(minor_status,
				 interprocess_token,
				 context_handle));
}


OM_uint32 GSS_CALLCONV gss_create_empty_oid_set
(OM_uint32 *              minor_status ,
 gss_OID_set *             oid_set 
)
{
    COM_CODE("gss_create_empty_oid_set")

    return ( (*function)(minor_status,
				 oid_set));
}

OM_uint32 GSS_CALLCONV gss_add_oid_set_member
(OM_uint32 *              minor_status ,
 const gss_OID            member_oid ,
 gss_OID_set *             oid_set 
)
{
    COM_CODE("gss_add_oid_set_number")

    return ( (*function)(minor_status,
				 member_oid,
				 oid_set));
}

OM_uint32 GSS_CALLCONV gss_test_oid_set_member
(OM_uint32 *              minor_status ,
 const gss_OID            member ,
 const gss_OID_set        set ,
 int *                    present 
)
{
    COM_CODE("gss_test_oid_set_member")

    return ( (*function)(minor_status,
				 member,
				 set,
				 present));
}

OM_uint32 GSS_CALLCONV gss_inquire_names_for_mech
(OM_uint32 *              minor_status ,
 const gss_OID            mechanism ,
 gss_OID_set *            name_types 
)
{
    COM_CODE("gss_inquire_names_for_mech")

    return ( (*function)(minor_status,
				 mechanism,
				 name_types));
}

OM_uint32 GSS_CALLCONV gss_inquire_mechs_for_name
(OM_uint32 *              minor_status ,
 const gss_name_t         input_name ,
 gss_OID_set *            mech_types 
)
{
    COM_CODE("gss_inquire_mechs_for_name")

    return ( (*function)(minor_status,
				 input_name,
				 mech_types));
}

OM_uint32 GSS_CALLCONV gss_canonicalize_name
(OM_uint32 *              minor_status ,
 const gss_name_t         input_name ,
 const gss_OID            mech_type ,
 gss_name_t *             output_name 
)
{
    COM_CODE("gss_canonicalize_name")

    return ( (*function)(minor_status,
				 input_name,
				 mech_type,
				 output_name));
}

OM_uint32 GSS_CALLCONV gss_duplicate_name
(OM_uint32 *              minor_status ,
 const gss_name_t         src_name ,
 gss_name_t *             dest_name 
)
{
    COM_CODE("gss_duplicate_name")

    return ( (*function)(minor_status,
				 src_name,
				 dest_name));
}

OM_uint32 GSS_CALLCONV gss_sign
(OM_uint32 *         minor_status,
 gss_ctx_id_t        context_handle,
 int                 qop_req,
 gss_buffer_t        message_buffer,
 gss_buffer_t        message_token
)
{
    COM_CODE("gss_sign")

    return ( (*function)(minor_status,
				 context_handle,
				 qop_req,
				 message_buffer,
				 message_token));
}

OM_uint32 GSS_CALLCONV gss_verify
(OM_uint32 *        minor_status,
 gss_ctx_id_t       context_handle,
 gss_buffer_t       message_buffer,
 gss_buffer_t       token_buffer,
 int *              qop_state
)
{
    COM_CODE("gss_verify")

    return ( (*function)(minor_status,
				 context_handle,
				 message_buffer,
				 token_buffer,
				 qop_state));
}

OM_uint32 GSS_CALLCONV gss_seal
(OM_uint32 *        minor_status,
 gss_ctx_id_t       context_handle,
 int                conf_req_flag,
 int                qop_req,
 gss_buffer_t       input_message_buffer,
 int *              conf_state,
 gss_buffer_t       output_message_buffer
)
{
    COM_CODE("gss_seal")

    return ( (*function)(minor_status,
				 context_handle,
				 conf_req_flag,
				 qop_req,
				 input_message_buffer,
				 conf_state,
				 output_message_buffer));
}

OM_uint32 GSS_CALLCONV gss_unseal
(OM_uint32 *        minor_status,
 gss_ctx_id_t       context_handle,
 gss_buffer_t       input_message_buffer,
 gss_buffer_t       output_message_buffer,
 int *              conf_state,
 int *              qop_state
)
{
    COM_CODE("gss_unseal")

    return ( (*function)(minor_status,
				 context_handle,
				 input_message_buffer,
				 output_message_buffer,
				 conf_state,
				 qop_state));
}