~ubuntu-branches/ubuntu/maverick/krb5/maverick

« back to all changes in this revision

Viewing changes to src/lib/gssapi/generic/gssapi.hin

  • Committer: Bazaar Package Importer
  • Author(s): Sam Hartman
  • Date: 2009-05-07 16:16:34 UTC
  • mfrom: (13.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20090507161634-xqyk0s9na0le4flj
Tags: 1.7dfsg~beta1-4
When  decrypting the TGS response fails with the subkey, try with the
session key to work around Heimdal bug, Closes: #527353 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- mode: c; indent-tabs-mode: nil -*- */
1
2
/*
2
3
 * Copyright 1993 by OpenVision Technologies, Inc.
3
 
 * 
 
4
 *
4
5
 * Permission to use, copy, modify, distribute, and sell this software
5
6
 * and its documentation for any purpose is hereby granted without fee,
6
7
 * provided that the above copyright notice appears in all copies and
10
11
 * without specific, written prior permission. OpenVision makes no
11
12
 * representations about the suitability of this software for any
12
13
 * purpose.  It is provided "as is" without express or implied warranty.
13
 
 * 
 
14
 *
14
15
 * OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15
16
 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16
17
 * EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
28
29
 */
29
30
 
30
31
#if defined(__MACH__) && defined(__APPLE__)
31
 
#       include <TargetConditionals.h>
32
 
#       if TARGET_RT_MAC_CFM
33
 
#               error "Use KfM 4.0 SDK headers for CFM compilation."
34
 
#       endif
 
32
#       include <TargetConditionals.h>
 
33
#       if TARGET_RT_MAC_CFM
 
34
#               error "Use KfM 4.0 SDK headers for CFM compilation."
 
35
#       endif
35
36
#endif
36
37
 
37
38
#ifdef __cplusplus
39
40
#endif /* __cplusplus */
40
41
 
41
42
#if TARGET_OS_MAC
42
 
#       pragma options align=mac68k
 
43
#    pragma pack(push,2)
43
44
#endif
44
45
 
45
46
#if defined(_MSDOS) || defined(_WIN32)
62
63
#include <sys/types.h>
63
64
 
64
65
/*
65
 
 * $Id: gssapi.hin 18396 2006-07-25 20:29:43Z lxs $
 
66
 * $Id: gssapi.hin 22255 2009-04-15 20:07:48Z tlyu $
66
67
 */
67
68
 
68
69
/*
85
86
typedef uint32_t gss_uint32;
86
87
typedef int32_t gss_int32;
87
88
 
88
 
#ifdef  OM_STRING
 
89
#ifdef  OM_STRING
89
90
/*
90
91
 * We have included the xom.h header file.  Use the definition for
91
92
 * OM_object identifier.
92
93
 */
93
 
typedef OM_object_identifier    gss_OID_desc, *gss_OID;
94
 
#else   /* OM_STRING */
 
94
typedef OM_object_identifier    gss_OID_desc, *gss_OID;
 
95
#else   /* OM_STRING */
95
96
/*
96
97
 * We can't use X/Open definitions, so roll our own.
97
98
 */
98
 
typedef gss_uint32      OM_uint32;
 
99
typedef gss_uint32      OM_uint32;
99
100
 
100
101
typedef struct gss_OID_desc_struct {
101
 
      OM_uint32 length;
102
 
      void *elements;
 
102
    OM_uint32 length;
 
103
    void *elements;
103
104
} gss_OID_desc, *gss_OID;
104
 
#endif  /* OM_STRING */
 
105
#endif  /* OM_STRING */
105
106
 
106
107
typedef struct gss_OID_set_desc_struct  {
107
 
      size_t  count;
108
 
      gss_OID elements;
 
108
    size_t  count;
 
109
    gss_OID elements;
109
110
} gss_OID_set_desc, *gss_OID_set;
110
111
 
111
112
typedef struct gss_buffer_desc_struct {
112
 
      size_t length;
113
 
      void *value;
 
113
    size_t length;
 
114
    void *value;
114
115
} gss_buffer_desc, *gss_buffer_t;
115
116
 
116
117
typedef struct gss_channel_bindings_struct {
117
 
      OM_uint32 initiator_addrtype;
118
 
      gss_buffer_desc initiator_address;
119
 
      OM_uint32 acceptor_addrtype;
120
 
      gss_buffer_desc acceptor_address;
121
 
      gss_buffer_desc application_data;
 
118
    OM_uint32 initiator_addrtype;
 
119
    gss_buffer_desc initiator_address;
 
120
    OM_uint32 acceptor_addrtype;
 
121
    gss_buffer_desc acceptor_address;
 
122
    gss_buffer_desc application_data;
122
123
} *gss_channel_bindings_t;
123
124
 
124
125
/*
125
126
 * For now, define a QOP-type as an OM_uint32 (pending resolution of ongoing
126
127
 * discussions).
127
128
 */
128
 
typedef OM_uint32       gss_qop_t;
129
 
typedef int             gss_cred_usage_t;
 
129
typedef OM_uint32       gss_qop_t;
 
130
typedef int             gss_cred_usage_t;
130
131
 
131
132
/*
132
133
 * Flag bits for context-level services.
133
134
 */
134
 
#define GSS_C_DELEG_FLAG 1
135
 
#define GSS_C_MUTUAL_FLAG 2
136
 
#define GSS_C_REPLAY_FLAG 4
137
 
#define GSS_C_SEQUENCE_FLAG 8
138
 
#define GSS_C_CONF_FLAG 16
139
 
#define GSS_C_INTEG_FLAG 32
140
 
#define GSS_C_ANON_FLAG 64
141
 
#define GSS_C_PROT_READY_FLAG 128
142
 
#define GSS_C_TRANS_FLAG 256
143
 
 
144
 
#define GSS_C_DCE_STYLE 4096
145
 
 
146
 
/*
147
 
 * Flag bits used on Microsoft platform
148
 
 * (for portability reasons)
149
 
 */
150
 
#define ISC_REQ_MUTUAL_AUTH       GSS_C_MUTUAL_FLAG
151
 
#define ISC_REQ_REPLAY_DETECT     GSS_C_REPLAY_FLAG
152
 
#define ISC_REQ_INTEGRITY         GSS_C_INTEG_FLAG
153
 
#define ISC_REQ_CONFIDENTIALITY   GSS_C_CONF_FLAG
 
135
#define GSS_C_DELEG_FLAG        1
 
136
#define GSS_C_MUTUAL_FLAG       2
 
137
#define GSS_C_REPLAY_FLAG       4
 
138
#define GSS_C_SEQUENCE_FLAG     8
 
139
#define GSS_C_CONF_FLAG         16
 
140
#define GSS_C_INTEG_FLAG        32
 
141
#define GSS_C_ANON_FLAG         64
 
142
#define GSS_C_PROT_READY_FLAG   128
 
143
#define GSS_C_TRANS_FLAG        256
 
144
#define GSS_C_DELEG_POLICY_FLAG 32768
154
145
 
155
146
/*
156
147
 * Credential usage options
157
148
 */
158
 
#define GSS_C_BOTH 0
159
 
#define GSS_C_INITIATE 1
160
 
#define GSS_C_ACCEPT 2
 
149
#define GSS_C_BOTH      0
 
150
#define GSS_C_INITIATE  1
 
151
#define GSS_C_ACCEPT    2
161
152
 
162
153
/*
163
154
 * Status code types for gss_display_status
164
155
 */
165
 
#define GSS_C_GSS_CODE 1
 
156
#define GSS_C_GSS_CODE  1
166
157
#define GSS_C_MECH_CODE 2
167
158
 
168
159
/*
188
179
#define GSS_C_AF_BSC        17
189
180
#define GSS_C_AF_DSS        18
190
181
#define GSS_C_AF_OSI        19
 
182
#define GSS_C_AF_NETBIOS    20
191
183
#define GSS_C_AF_X25        21
192
184
 
193
185
#define GSS_C_AF_NULLADDR   255
208
200
 * Some alternate names for a couple of the above values.  These are defined
209
201
 * for V1 compatibility.
210
202
 */
211
 
#define GSS_C_NULL_OID          GSS_C_NO_OID
212
 
#define GSS_C_NULL_OID_SET      GSS_C_NO_OID_SET
 
203
#define GSS_C_NULL_OID          GSS_C_NO_OID
 
204
#define GSS_C_NULL_OID_SET      GSS_C_NO_OID_SET
213
205
 
214
206
/*
215
207
 * Define the default Quality of Protection for per-message services.  Note
255
247
  ((x) & (GSS_C_SUPPLEMENTARY_MASK << GSS_C_SUPPLEMENTARY_OFFSET))
256
248
#define GSS_ERROR(x) \
257
249
  ((x) & ((GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET) | \
258
 
          (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET)))
 
250
          (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET)))
259
251
 
260
252
/*
261
253
 * Now the actual status code definitions
418
410
 
419
411
/* Function Prototypes */
420
412
 
421
 
OM_uint32 KRB5_CALLCONV gss_acquire_cred
422
 
(OM_uint32 *,           /* minor_status */
423
 
            gss_name_t,                 /* desired_name */
424
 
            OM_uint32,                  /* time_req */
425
 
            gss_OID_set,                /* desired_mechs */
426
 
            gss_cred_usage_t,           /* cred_usage */
427
 
            gss_cred_id_t *,    /* output_cred_handle */
428
 
            gss_OID_set *,              /* actual_mechs */
429
 
            OM_uint32 *         /* time_rec */
430
 
           );
431
 
 
432
 
OM_uint32 KRB5_CALLCONV gss_release_cred
433
 
(OM_uint32 *,           /* minor_status */
434
 
            gss_cred_id_t *             /* cred_handle */
435
 
           );
436
 
 
437
 
OM_uint32 KRB5_CALLCONV gss_init_sec_context
438
 
(OM_uint32 *,           /* minor_status */
439
 
            gss_cred_id_t,              /* claimant_cred_handle */
440
 
            gss_ctx_id_t *,             /* context_handle */
441
 
            gss_name_t,                 /* target_name */
442
 
            gss_OID,                    /* mech_type (used to be const) */
443
 
            OM_uint32,                  /* req_flags */
444
 
            OM_uint32,                  /* time_req */
445
 
            gss_channel_bindings_t,     /* input_chan_bindings */
446
 
            gss_buffer_t,               /* input_token */
447
 
            gss_OID *,          /* actual_mech_type */
448
 
            gss_buffer_t,               /* output_token */
449
 
            OM_uint32 *,                /* ret_flags */
450
 
            OM_uint32 *         /* time_rec */
451
 
           );
452
 
 
453
 
OM_uint32 KRB5_CALLCONV gss_accept_sec_context
454
 
(OM_uint32 *,           /* minor_status */
455
 
            gss_ctx_id_t *,             /* context_handle */
456
 
            gss_cred_id_t,              /* acceptor_cred_handle */
457
 
            gss_buffer_t,               /* input_token_buffer */
458
 
            gss_channel_bindings_t,     /* input_chan_bindings */
459
 
            gss_name_t *,               /* src_name */
460
 
            gss_OID *,          /* mech_type */
461
 
            gss_buffer_t,               /* output_token */
462
 
            OM_uint32 *,                /* ret_flags */
463
 
            OM_uint32 *,                /* time_rec */
464
 
            gss_cred_id_t *             /* delegated_cred_handle */
465
 
           );
466
 
 
467
 
OM_uint32 KRB5_CALLCONV gss_process_context_token
468
 
(OM_uint32 *,           /* minor_status */
469
 
            gss_ctx_id_t,               /* context_handle */
470
 
            gss_buffer_t                /* token_buffer */
471
 
           );
472
 
 
473
 
OM_uint32 KRB5_CALLCONV gss_delete_sec_context
474
 
(OM_uint32 *,           /* minor_status */
475
 
            gss_ctx_id_t *,             /* context_handle */
476
 
            gss_buffer_t                /* output_token */
477
 
           );
478
 
 
479
 
OM_uint32 KRB5_CALLCONV gss_context_time
480
 
(OM_uint32 *,           /* minor_status */
481
 
            gss_ctx_id_t,               /* context_handle */
482
 
            OM_uint32 *         /* time_rec */
483
 
           );
484
 
 
485
 
/* New for V2 */
486
 
OM_uint32 KRB5_CALLCONV gss_get_mic
487
 
(OM_uint32 *,           /* minor_status */
488
 
            gss_ctx_id_t,               /* context_handle */
489
 
            gss_qop_t,                  /* qop_req */
490
 
            gss_buffer_t,               /* message_buffer */
491
 
            gss_buffer_t                /* message_token */
492
 
           );
493
 
 
494
 
/* New for V2 */
495
 
OM_uint32 KRB5_CALLCONV gss_verify_mic
496
 
(OM_uint32 *,           /* minor_status */
497
 
            gss_ctx_id_t,               /* context_handle */
498
 
            gss_buffer_t,               /* message_buffer */
499
 
            gss_buffer_t,               /* message_token */
500
 
            gss_qop_t *                 /* qop_state */
501
 
           );
502
 
 
503
 
/* New for V2 */
504
 
OM_uint32 KRB5_CALLCONV gss_wrap
505
 
(OM_uint32 *,           /* minor_status */
506
 
            gss_ctx_id_t,               /* context_handle */
507
 
            int,                        /* conf_req_flag */
508
 
            gss_qop_t,                  /* qop_req */
509
 
            gss_buffer_t,               /* input_message_buffer */
510
 
            int *,                      /* conf_state */
511
 
            gss_buffer_t                /* output_message_buffer */
512
 
           );
513
 
 
514
 
/* New for V2 */
515
 
OM_uint32 KRB5_CALLCONV gss_unwrap
516
 
(OM_uint32 *,           /* minor_status */
517
 
            gss_ctx_id_t,               /* context_handle */
518
 
            gss_buffer_t,               /* input_message_buffer */
519
 
            gss_buffer_t,               /* output_message_buffer */
520
 
            int *,                      /* conf_state */
521
 
            gss_qop_t *         /* qop_state */
522
 
           );
523
 
 
524
 
OM_uint32 KRB5_CALLCONV gss_display_status
525
 
(OM_uint32 *,           /* minor_status */
526
 
            OM_uint32,                  /* status_value */
527
 
            int,                        /* status_type */
528
 
            gss_OID,                    /* mech_type (used to be const) */
529
 
            OM_uint32 *,                /* message_context */
530
 
            gss_buffer_t                /* status_string */
531
 
           );
532
 
 
533
 
OM_uint32 KRB5_CALLCONV gss_indicate_mechs
534
 
(OM_uint32 *,           /* minor_status */
535
 
            gss_OID_set *               /* mech_set */
536
 
           );
537
 
 
538
 
OM_uint32 KRB5_CALLCONV gss_compare_name
539
 
(OM_uint32 *,           /* minor_status */
540
 
            gss_name_t,                 /* name1 */
541
 
            gss_name_t,                 /* name2 */
542
 
            int *                       /* name_equal */
543
 
           );
544
 
 
545
 
OM_uint32 KRB5_CALLCONV gss_display_name
546
 
(OM_uint32 *,           /* minor_status */
547
 
            gss_name_t,                 /* input_name */
548
 
            gss_buffer_t,               /* output_name_buffer */
549
 
            gss_OID *           /* output_name_type */
550
 
           );
551
 
 
552
 
OM_uint32 KRB5_CALLCONV gss_import_name
553
 
(OM_uint32 *,           /* minor_status */
554
 
            gss_buffer_t,               /* input_name_buffer */
555
 
            gss_OID,                    /* input_name_type(used to be const) */
556
 
            gss_name_t *                /* output_name */
557
 
           );
558
 
 
559
 
OM_uint32 KRB5_CALLCONV gss_release_name
560
 
(OM_uint32 *,           /* minor_status */
561
 
            gss_name_t *                /* input_name */
562
 
           );
563
 
 
564
 
OM_uint32 KRB5_CALLCONV gss_release_buffer
565
 
(OM_uint32 *,           /* minor_status */
566
 
            gss_buffer_t                /* buffer */
567
 
           );
568
 
 
569
 
OM_uint32 KRB5_CALLCONV gss_release_oid_set
570
 
(OM_uint32 *,           /* minor_status */
571
 
            gss_OID_set *               /* set */
572
 
           );
573
 
 
574
 
OM_uint32 KRB5_CALLCONV gss_inquire_cred
575
 
(OM_uint32 *,           /* minor_status */
576
 
            gss_cred_id_t,              /* cred_handle */
577
 
            gss_name_t *,               /* name */
578
 
            OM_uint32 *,                /* lifetime */
579
 
            gss_cred_usage_t *, /* cred_usage */
580
 
            gss_OID_set *               /* mechanisms */
581
 
           );
 
413
OM_uint32 KRB5_CALLCONV
 
414
gss_acquire_cred(
 
415
    OM_uint32 *,        /* minor_status */
 
416
    gss_name_t,         /* desired_name */
 
417
    OM_uint32,          /* time_req */
 
418
    gss_OID_set,        /* desired_mechs */
 
419
    gss_cred_usage_t,   /* cred_usage */
 
420
    gss_cred_id_t *,    /* output_cred_handle */
 
421
    gss_OID_set *,      /* actual_mechs */
 
422
    OM_uint32 *);       /* time_rec */
 
423
 
 
424
OM_uint32 KRB5_CALLCONV
 
425
gss_release_cred(
 
426
    OM_uint32 *,        /* minor_status */
 
427
    gss_cred_id_t *);   /* cred_handle */
 
428
 
 
429
OM_uint32 KRB5_CALLCONV
 
430
gss_init_sec_context(
 
431
    OM_uint32 *,        /* minor_status */
 
432
    gss_cred_id_t,      /* claimant_cred_handle */
 
433
    gss_ctx_id_t *,     /* context_handle */
 
434
    gss_name_t,         /* target_name */
 
435
    gss_OID,            /* mech_type (used to be const) */
 
436
    OM_uint32,          /* req_flags */
 
437
    OM_uint32,          /* time_req */
 
438
    gss_channel_bindings_t,     /* input_chan_bindings */
 
439
    gss_buffer_t,       /* input_token */
 
440
    gss_OID *,          /* actual_mech_type */
 
441
    gss_buffer_t,       /* output_token */
 
442
    OM_uint32 *,        /* ret_flags */
 
443
    OM_uint32 *);       /* time_rec */
 
444
 
 
445
OM_uint32 KRB5_CALLCONV
 
446
gss_accept_sec_context(
 
447
    OM_uint32 *,                /* minor_status */
 
448
    gss_ctx_id_t *,             /* context_handle */
 
449
    gss_cred_id_t,              /* acceptor_cred_handle */
 
450
    gss_buffer_t,               /* input_token_buffer */
 
451
    gss_channel_bindings_t,     /* input_chan_bindings */
 
452
    gss_name_t *,               /* src_name */
 
453
    gss_OID *,                  /* mech_type */
 
454
    gss_buffer_t,               /* output_token */
 
455
    OM_uint32 *,                /* ret_flags */
 
456
    OM_uint32 *,                /* time_rec */
 
457
    gss_cred_id_t *);           /* delegated_cred_handle */
 
458
 
 
459
OM_uint32 KRB5_CALLCONV
 
460
gss_process_context_token(
 
461
    OM_uint32 *,        /* minor_status */
 
462
    gss_ctx_id_t,       /* context_handle */
 
463
    gss_buffer_t);      /* token_buffer */
 
464
 
 
465
 
 
466
OM_uint32 KRB5_CALLCONV
 
467
gss_delete_sec_context(
 
468
    OM_uint32 *,        /* minor_status */
 
469
    gss_ctx_id_t *,     /* context_handle */
 
470
    gss_buffer_t);      /* output_token */
 
471
 
 
472
 
 
473
OM_uint32 KRB5_CALLCONV
 
474
gss_context_time(
 
475
    OM_uint32 *,        /* minor_status */
 
476
    gss_ctx_id_t,       /* context_handle */
 
477
    OM_uint32 *);       /* time_rec */
 
478
 
 
479
 
 
480
/* New for V2 */
 
481
OM_uint32 KRB5_CALLCONV
 
482
gss_get_mic(
 
483
    OM_uint32 *,        /* minor_status */
 
484
    gss_ctx_id_t,       /* context_handle */
 
485
    gss_qop_t,          /* qop_req */
 
486
    gss_buffer_t,       /* message_buffer */
 
487
    gss_buffer_t);      /* message_token */
 
488
 
 
489
 
 
490
/* New for V2 */
 
491
OM_uint32 KRB5_CALLCONV
 
492
gss_verify_mic(OM_uint32 *,     /* minor_status */
 
493
               gss_ctx_id_t,    /* context_handle */
 
494
               gss_buffer_t,    /* message_buffer */
 
495
               gss_buffer_t,    /* message_token */
 
496
               gss_qop_t *      /* qop_state */
 
497
);
 
498
 
 
499
/* New for V2 */
 
500
OM_uint32 KRB5_CALLCONV
 
501
gss_wrap(
 
502
    OM_uint32 *,        /* minor_status */
 
503
    gss_ctx_id_t,       /* context_handle */
 
504
    int,                /* conf_req_flag */
 
505
    gss_qop_t,          /* qop_req */
 
506
    gss_buffer_t,       /* input_message_buffer */
 
507
    int *,              /* conf_state */
 
508
    gss_buffer_t);      /* output_message_buffer */
 
509
 
 
510
 
 
511
/* New for V2 */
 
512
OM_uint32 KRB5_CALLCONV
 
513
gss_unwrap(
 
514
    OM_uint32 *,        /* minor_status */
 
515
    gss_ctx_id_t,       /* context_handle */
 
516
    gss_buffer_t,       /* input_message_buffer */
 
517
    gss_buffer_t,       /* output_message_buffer */
 
518
    int *,              /* conf_state */
 
519
    gss_qop_t *);       /* qop_state */
 
520
 
 
521
 
 
522
OM_uint32 KRB5_CALLCONV
 
523
gss_display_status(
 
524
    OM_uint32 *,        /* minor_status */
 
525
    OM_uint32,          /* status_value */
 
526
    int,                /* status_type */
 
527
    gss_OID,            /* mech_type (used to be const) */
 
528
    OM_uint32 *,        /* message_context */
 
529
    gss_buffer_t);      /* status_string */
 
530
 
 
531
 
 
532
OM_uint32 KRB5_CALLCONV
 
533
gss_indicate_mechs(
 
534
    OM_uint32 *,        /* minor_status */
 
535
    gss_OID_set *);     /* mech_set */
 
536
 
 
537
 
 
538
OM_uint32 KRB5_CALLCONV
 
539
gss_compare_name(
 
540
    OM_uint32 *,        /* minor_status */
 
541
    gss_name_t,         /* name1 */
 
542
    gss_name_t,         /* name2 */
 
543
    int *);             /* name_equal */
 
544
 
 
545
 
 
546
OM_uint32 KRB5_CALLCONV
 
547
gss_display_name(
 
548
    OM_uint32 *,        /* minor_status */
 
549
    gss_name_t,         /* input_name */
 
550
    gss_buffer_t,       /* output_name_buffer */
 
551
    gss_OID *);         /* output_name_type */
 
552
 
 
553
 
 
554
OM_uint32 KRB5_CALLCONV
 
555
gss_import_name(
 
556
    OM_uint32 *,        /* minor_status */
 
557
    gss_buffer_t,       /* input_name_buffer */
 
558
    gss_OID,            /* input_name_type(used to be const) */
 
559
    gss_name_t *);      /* output_name */
 
560
 
 
561
OM_uint32 KRB5_CALLCONV
 
562
gss_release_name(
 
563
    OM_uint32 *,        /* minor_status */
 
564
    gss_name_t *);      /* input_name */
 
565
 
 
566
OM_uint32 KRB5_CALLCONV
 
567
gss_release_buffer(
 
568
    OM_uint32 *,        /* minor_status */
 
569
    gss_buffer_t);      /* buffer */
 
570
 
 
571
OM_uint32 KRB5_CALLCONV
 
572
gss_release_oid_set(
 
573
    OM_uint32 *,        /* minor_status */
 
574
    gss_OID_set *);     /* set */
 
575
 
 
576
OM_uint32 KRB5_CALLCONV
 
577
gss_inquire_cred(
 
578
    OM_uint32 *,        /* minor_status */
 
579
    gss_cred_id_t,      /* cred_handle */
 
580
    gss_name_t *,       /* name */
 
581
    OM_uint32 *,        /* lifetime */
 
582
    gss_cred_usage_t *, /* cred_usage */
 
583
    gss_OID_set *);     /* mechanisms */
582
584
 
583
585
/* Last argument new for V2 */
584
 
OM_uint32 KRB5_CALLCONV gss_inquire_context
585
 
(OM_uint32 *,           /* minor_status */
586
 
            gss_ctx_id_t,               /* context_handle */
587
 
            gss_name_t *,               /* src_name */
588
 
            gss_name_t *,               /* targ_name */
589
 
            OM_uint32 *,                /* lifetime_rec */
590
 
            gss_OID *,          /* mech_type */
591
 
            OM_uint32 *,                /* ctx_flags */
592
 
            int *,              /* locally_initiated */
593
 
            int *                       /* open */
594
 
           );
595
 
 
596
 
/* New for V2 */
597
 
OM_uint32 KRB5_CALLCONV gss_wrap_size_limit
598
 
(OM_uint32 *,           /* minor_status */
599
 
            gss_ctx_id_t,               /* context_handle */
600
 
            int,                        /* conf_req_flag */
601
 
            gss_qop_t,                  /* qop_req */
602
 
            OM_uint32,                  /* req_output_size */
603
 
            OM_uint32 *                 /* max_input_size */
604
 
           );
605
 
 
606
 
/* New for V2 */
607
 
OM_uint32 KRB5_CALLCONV gss_import_name_object
608
 
(OM_uint32 *,           /* minor_status */
609
 
            void *,                     /* input_name */
610
 
            gss_OID,                    /* input_name_type */
611
 
            gss_name_t *                /* output_name */
612
 
           );
613
 
 
614
 
/* New for V2 */
615
 
OM_uint32 KRB5_CALLCONV gss_export_name_object
616
 
(OM_uint32 *,           /* minor_status */
617
 
            gss_name_t,                 /* input_name */
618
 
            gss_OID,                    /* desired_name_type */
619
 
            void **             /* output_name */
620
 
           );
621
 
 
622
 
/* New for V2 */
623
 
OM_uint32 KRB5_CALLCONV gss_add_cred
624
 
(OM_uint32 *,           /* minor_status */
625
 
            gss_cred_id_t,              /* input_cred_handle */
626
 
            gss_name_t,                 /* desired_name */
627
 
            gss_OID,                    /* desired_mech */
628
 
            gss_cred_usage_t,           /* cred_usage */
629
 
            OM_uint32,                  /* initiator_time_req */
630
 
            OM_uint32,                  /* acceptor_time_req */
631
 
            gss_cred_id_t *,    /* output_cred_handle */
632
 
            gss_OID_set *,              /* actual_mechs */
633
 
            OM_uint32 *,                /* initiator_time_rec */
634
 
            OM_uint32 *         /* acceptor_time_rec */
635
 
           );
636
 
 
637
 
/* New for V2 */
638
 
OM_uint32 KRB5_CALLCONV gss_inquire_cred_by_mech
639
 
(OM_uint32 *,           /* minor_status */
640
 
            gss_cred_id_t,              /* cred_handle */
641
 
            gss_OID,                    /* mech_type */
642
 
            gss_name_t *,               /* name */
643
 
            OM_uint32 *,                /* initiator_lifetime */
644
 
            OM_uint32 *,                /* acceptor_lifetime */
645
 
            gss_cred_usage_t *  /* cred_usage */
646
 
           );
647
 
 
648
 
/* New for V2 */
649
 
OM_uint32 KRB5_CALLCONV gss_export_sec_context
650
 
(OM_uint32 *,           /* minor_status */
651
 
            gss_ctx_id_t *,             /* context_handle */
652
 
            gss_buffer_t                /* interprocess_token */
653
 
            );
654
 
 
655
 
/* New for V2 */
656
 
OM_uint32 KRB5_CALLCONV gss_import_sec_context
657
 
(OM_uint32 *,           /* minor_status */
658
 
            gss_buffer_t,               /* interprocess_token */
659
 
            gss_ctx_id_t *              /* context_handle */
660
 
            );
661
 
 
662
 
/* New for V2 */
663
 
OM_uint32 KRB5_CALLCONV gss_release_oid
664
 
(OM_uint32 *,           /* minor_status */
665
 
            gss_OID *           /* oid */
666
 
           );
667
 
 
668
 
/* New for V2 */
669
 
OM_uint32 KRB5_CALLCONV gss_create_empty_oid_set
670
 
(OM_uint32 *,           /* minor_status */
671
 
            gss_OID_set *               /* oid_set */
672
 
           );
673
 
 
674
 
/* New for V2 */
675
 
OM_uint32 KRB5_CALLCONV gss_add_oid_set_member
676
 
(OM_uint32 *,           /* minor_status */
677
 
            gss_OID,                    /* member_oid */
678
 
            gss_OID_set *               /* oid_set */
679
 
           );
680
 
 
681
 
/* New for V2 */
682
 
OM_uint32 KRB5_CALLCONV gss_test_oid_set_member
683
 
(OM_uint32 *,           /* minor_status */
684
 
            gss_OID,                    /* member */
685
 
            gss_OID_set,                /* set */
686
 
            int *                       /* present */
687
 
           );
688
 
 
689
 
/* New for V2 */
690
 
OM_uint32 KRB5_CALLCONV gss_str_to_oid
691
 
(OM_uint32 *,           /* minor_status */
692
 
            gss_buffer_t,               /* oid_str */
693
 
            gss_OID *           /* oid */
694
 
           );
695
 
 
696
 
/* New for V2 */
697
 
OM_uint32 KRB5_CALLCONV gss_oid_to_str
698
 
(OM_uint32 *,           /* minor_status */
699
 
            gss_OID,                    /* oid */
700
 
            gss_buffer_t                /* oid_str */
701
 
           );
702
 
 
703
 
/* New for V2 */
704
 
OM_uint32 KRB5_CALLCONV gss_inquire_names_for_mech
705
 
(OM_uint32 *,           /* minor_status */
706
 
            gss_OID,                    /* mechanism */
707
 
            gss_OID_set *               /* name_types */
708
 
           );
709
 
 
710
 
/* New for V2 */
711
 
OM_uint32 KRB5_CALLCONV gss_inquire_mechs_for_name(
712
 
    OM_uint32 *,                /* minor_status */
713
 
    const gss_name_t,           /* input_name */
714
 
    gss_OID_set *               /* mech_types */
715
 
);
 
586
OM_uint32 KRB5_CALLCONV
 
587
gss_inquire_context(
 
588
    OM_uint32 *,        /* minor_status */
 
589
    gss_ctx_id_t,       /* context_handle */
 
590
    gss_name_t *,       /* src_name */
 
591
    gss_name_t *,       /* targ_name */
 
592
    OM_uint32 *,        /* lifetime_rec */
 
593
    gss_OID *,          /* mech_type */
 
594
    OM_uint32 *,        /* ctx_flags */
 
595
    int *,              /* locally_initiated */
 
596
    int *);             /* open */
 
597
 
 
598
/* New for V2 */
 
599
OM_uint32 KRB5_CALLCONV
 
600
gss_wrap_size_limit(
 
601
    OM_uint32 *,        /* minor_status */
 
602
    gss_ctx_id_t,       /* context_handle */
 
603
    int,                /* conf_req_flag */
 
604
    gss_qop_t,          /* qop_req */
 
605
    OM_uint32,          /* req_output_size */
 
606
    OM_uint32 *);       /* max_input_size */
 
607
 
 
608
/* New for V2 */
 
609
OM_uint32 KRB5_CALLCONV
 
610
gss_import_name_object(
 
611
    OM_uint32 *,        /* minor_status */
 
612
    void *,             /* input_name */
 
613
    gss_OID,            /* input_name_type */
 
614
    gss_name_t *);      /* output_name */
 
615
 
 
616
/* New for V2 */
 
617
OM_uint32 KRB5_CALLCONV
 
618
gss_export_name_object(
 
619
    OM_uint32 *,        /* minor_status */
 
620
    gss_name_t,         /* input_name */
 
621
    gss_OID,            /* desired_name_type */
 
622
    void **);           /* output_name */
 
623
 
 
624
/* New for V2 */
 
625
OM_uint32 KRB5_CALLCONV
 
626
gss_add_cred(
 
627
    OM_uint32 *,        /* minor_status */
 
628
    gss_cred_id_t,      /* input_cred_handle */
 
629
    gss_name_t,         /* desired_name */
 
630
    gss_OID,            /* desired_mech */
 
631
    gss_cred_usage_t,   /* cred_usage */
 
632
    OM_uint32,          /* initiator_time_req */
 
633
    OM_uint32,          /* acceptor_time_req */
 
634
    gss_cred_id_t *,    /* output_cred_handle */
 
635
    gss_OID_set *,      /* actual_mechs */
 
636
    OM_uint32 *,        /* initiator_time_rec */
 
637
    OM_uint32 *);       /* acceptor_time_rec */
 
638
 
 
639
/* New for V2 */
 
640
OM_uint32 KRB5_CALLCONV
 
641
gss_inquire_cred_by_mech(
 
642
    OM_uint32 *,                /* minor_status */
 
643
    gss_cred_id_t,              /* cred_handle */
 
644
    gss_OID,                    /* mech_type */
 
645
    gss_name_t *,               /* name */
 
646
    OM_uint32 *,                /* initiator_lifetime */
 
647
    OM_uint32 *,                /* acceptor_lifetime */
 
648
    gss_cred_usage_t *);        /* cred_usage */
 
649
 
 
650
/* New for V2 */
 
651
OM_uint32 KRB5_CALLCONV
 
652
gss_export_sec_context(
 
653
    OM_uint32 *,        /* minor_status */
 
654
    gss_ctx_id_t *,     /* context_handle */
 
655
    gss_buffer_t);      /* interprocess_token */
 
656
 
 
657
/* New for V2 */
 
658
OM_uint32 KRB5_CALLCONV
 
659
gss_import_sec_context(
 
660
    OM_uint32 *,        /* minor_status */
 
661
    gss_buffer_t,       /* interprocess_token */
 
662
    gss_ctx_id_t *);    /* context_handle */
 
663
 
 
664
/* New for V2 */
 
665
OM_uint32 KRB5_CALLCONV
 
666
gss_release_oid(
 
667
    OM_uint32 *,        /* minor_status */
 
668
    gss_OID *);         /* oid */
 
669
 
 
670
/* New for V2 */
 
671
OM_uint32 KRB5_CALLCONV
 
672
gss_create_empty_oid_set(
 
673
    OM_uint32 *,        /* minor_status */
 
674
    gss_OID_set *);     /* oid_set */
 
675
 
 
676
/* New for V2 */
 
677
OM_uint32 KRB5_CALLCONV
 
678
gss_add_oid_set_member(
 
679
    OM_uint32 *,        /* minor_status */
 
680
    gss_OID,            /* member_oid */
 
681
    gss_OID_set *);     /* oid_set */
 
682
 
 
683
/* New for V2 */
 
684
OM_uint32 KRB5_CALLCONV
 
685
gss_test_oid_set_member(
 
686
    OM_uint32 *,        /* minor_status */
 
687
    gss_OID,            /* member */
 
688
    gss_OID_set,        /* set */
 
689
    int *);             /* present */
 
690
 
 
691
/* New for V2 */
 
692
OM_uint32 KRB5_CALLCONV
 
693
gss_str_to_oid(
 
694
    OM_uint32 *,        /* minor_status */
 
695
    gss_buffer_t,       /* oid_str */
 
696
    gss_OID *);         /* oid */
 
697
 
 
698
/* New for V2 */
 
699
OM_uint32 KRB5_CALLCONV
 
700
gss_oid_to_str(
 
701
    OM_uint32 *,        /* minor_status */
 
702
    gss_OID,            /* oid */
 
703
    gss_buffer_t);      /* oid_str */
 
704
 
 
705
/* New for V2 */
 
706
OM_uint32 KRB5_CALLCONV
 
707
gss_inquire_names_for_mech(
 
708
    OM_uint32 *,        /* minor_status */
 
709
    gss_OID,            /* mechanism */
 
710
    gss_OID_set *);     /* name_types */
 
711
 
 
712
/* New for V2 */
 
713
OM_uint32 KRB5_CALLCONV
 
714
gss_inquire_mechs_for_name(
 
715
    OM_uint32 *,        /* minor_status */
 
716
    const gss_name_t,   /* input_name */
 
717
    gss_OID_set *);     /* mech_types */
716
718
 
717
719
/*
718
720
 * The following routines are obsolete variants of gss_get_mic, gss_wrap,
721
723
 * entrypoints (as opposed to #defines) should be provided, to allow GSSAPI
722
724
 * V1 applications to link against GSSAPI V2 implementations.
723
725
 */
724
 
OM_uint32 KRB5_CALLCONV gss_sign
725
 
(OM_uint32 *,    /* minor_status */
726
 
            gss_ctx_id_t,       /* context_handle */
727
 
            int,                /* qop_req */
728
 
            gss_buffer_t,       /* message_buffer */
729
 
            gss_buffer_t        /* message_token */
730
 
           );
731
 
 
732
 
OM_uint32 KRB5_CALLCONV gss_verify
733
 
(OM_uint32 *,    /* minor_status */
734
 
            gss_ctx_id_t,       /* context_handle */
735
 
            gss_buffer_t,       /* message_buffer */
736
 
            gss_buffer_t,       /* token_buffer */
737
 
            int *           /* qop_state */
738
 
           );
739
 
 
740
 
OM_uint32 KRB5_CALLCONV gss_seal
741
 
(OM_uint32 *,    /* minor_status */
742
 
            gss_ctx_id_t,       /* context_handle */
743
 
            int,                /* conf_req_flag */
744
 
            int,                /* qop_req */
745
 
            gss_buffer_t,       /* input_message_buffer */
746
 
            int *,          /* conf_state */
747
 
            gss_buffer_t        /* output_message_buffer */
748
 
           );
749
 
 
750
 
OM_uint32 KRB5_CALLCONV gss_unseal
751
 
(OM_uint32 *,    /* minor_status */
752
 
            gss_ctx_id_t,       /* context_handle */
753
 
            gss_buffer_t,       /* input_message_buffer */
754
 
            gss_buffer_t,       /* output_message_buffer */
755
 
            int *,          /* conf_state */
756
 
            int *           /* qop_state */
757
 
           );
758
 
 
759
 
/* New for V2 */
760
 
OM_uint32 KRB5_CALLCONV gss_export_name
761
 
(OM_uint32  *,          /* minor_status */
762
 
                 const gss_name_t,      /* input_name */
763
 
                 gss_buffer_t           /* exported_name */
764
 
        );
765
 
 
766
 
/* New for V2 */
767
 
OM_uint32 KRB5_CALLCONV gss_duplicate_name
768
 
(OM_uint32  *,          /* minor_status */
769
 
                 const gss_name_t,      /* input_name */
770
 
                 gss_name_t *           /* dest_name */
771
 
        );
772
 
 
773
 
/* New for V2 */
774
 
OM_uint32 KRB5_CALLCONV gss_canonicalize_name
775
 
(OM_uint32  *,          /* minor_status */
776
 
                 const gss_name_t,      /* input_name */
777
 
                 const gss_OID,         /* mech_type */
778
 
                 gss_name_t *           /* output_name */
779
 
        );
780
 
 
781
 
 
782
 
 
783
 
/* New Likewise API */
784
 
OM_uint32 KRB5_CALLCONV gss_inquire_context2
785
 
(OM_uint32 *,           /* minor_status */
786
 
            gss_ctx_id_t,               /* context_handle */
787
 
            gss_name_t *,               /* src_name */
788
 
            gss_name_t *,               /* targ_name */
789
 
            OM_uint32 *,                /* lifetime_rec */
790
 
            gss_OID *,          /* mech_type */
791
 
            OM_uint32 *,                /* ctx_flags */
792
 
            int *,              /* locally_initiated */
793
 
            int *,                      /* open */
794
 
            gss_buffer_t
795
 
           );
 
726
OM_uint32 KRB5_CALLCONV
 
727
gss_sign(
 
728
    OM_uint32 *,        /* minor_status */
 
729
    gss_ctx_id_t,       /* context_handle */
 
730
    int,                /* qop_req */
 
731
    gss_buffer_t,       /* message_buffer */
 
732
    gss_buffer_t);      /* message_token */
 
733
 
 
734
OM_uint32 KRB5_CALLCONV
 
735
gss_verify(
 
736
    OM_uint32 *,        /* minor_status */
 
737
    gss_ctx_id_t,       /* context_handle */
 
738
    gss_buffer_t,       /* message_buffer */
 
739
    gss_buffer_t,       /* token_buffer */
 
740
    int *);             /* qop_state */
 
741
 
 
742
OM_uint32 KRB5_CALLCONV
 
743
gss_seal(
 
744
    OM_uint32 *,        /* minor_status */
 
745
    gss_ctx_id_t,       /* context_handle */
 
746
    int,                /* conf_req_flag */
 
747
    int,                /* qop_req */
 
748
    gss_buffer_t,       /* input_message_buffer */
 
749
    int *,              /* conf_state */
 
750
    gss_buffer_t);      /* output_message_buffer */
 
751
 
 
752
OM_uint32 KRB5_CALLCONV
 
753
gss_unseal(
 
754
    OM_uint32 *,        /* minor_status */
 
755
    gss_ctx_id_t,       /* context_handle */
 
756
    gss_buffer_t,       /* input_message_buffer */
 
757
    gss_buffer_t,       /* output_message_buffer */
 
758
    int *,              /* conf_state */
 
759
    int *);             /* qop_state */
 
760
 
 
761
/* New for V2 */
 
762
OM_uint32 KRB5_CALLCONV
 
763
gss_export_name(
 
764
    OM_uint32  *,       /* minor_status */
 
765
    const gss_name_t,   /* input_name */
 
766
    gss_buffer_t);      /* exported_name */
 
767
 
 
768
/* New for V2 */
 
769
OM_uint32 KRB5_CALLCONV
 
770
gss_duplicate_name(
 
771
    OM_uint32  *,       /* minor_status */
 
772
    const gss_name_t,   /* input_name */
 
773
    gss_name_t *);      /* dest_name */
 
774
 
 
775
/* New for V2 */
 
776
OM_uint32 KRB5_CALLCONV
 
777
gss_canonicalize_name(
 
778
    OM_uint32  *,       /* minor_status */
 
779
    const gss_name_t,   /* input_name */
 
780
    const gss_OID,      /* mech_type */
 
781
    gss_name_t *);      /* output_name */
796
782
 
797
783
#if TARGET_OS_MAC
798
 
#  pragma options align=reset
 
784
#    pragma pack(pop)
799
785
#endif
800
786
 
801
787
#ifdef __cplusplus