xref: /illumos-gate/usr/src/uts/common/gssapi/mechs/krb5/include/krb5.h (revision 56e2cc86321ec889bf83a888d902c60d6fb2ef8d)
1 /*
2  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
3  * Use is subject to license terms.
4  */
5 
6 /* This is the prologue to krb5.h */
7 /* Unfortunately some of these defines are compiler dependent */
8 #ifndef _KRB5_H
9 #define _KRB5_H
10 
11 
12 #define SIZEOF_INT 4
13 
14 #ifdef _LP64
15 #define SIZEOF_LONG 8
16 #else
17 #define SIZEOF_LONG 4
18 #endif
19 
20 #define SIZEOF_SHORT 2
21 #define HAVE_STDARG_H 1
22 #define HAVE_SYS_TYPES_H 1
23 /* End of prologue section */
24 /*
25  * include/krb5.h
26  *
27  * Copyright 1989,1990,1995,2001, 2003  by the Massachusetts Institute of Technology.
28  * All Rights Reserved.
29  *
30  * Export of this software from the United States of America may
31  *   require a specific license from the United States Government.
32  *   It is the responsibility of any person or organization contemplating
33  *   export to obtain such a license before exporting.
34  *
35  * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
36  * distribute this software and its documentation for any purpose and
37  * without fee is hereby granted, provided that the above copyright
38  * notice appear in all copies and that both that copyright notice and
39  * this permission notice appear in supporting documentation, and that
40  * the name of M.I.T. not be used in advertising or publicity pertaining
41  * to distribution of the software without specific, written prior
42  * permission.	Furthermore if you modify this software you must label
43  * your software as modified software and not distribute it in such a
44  * fashion that it might be confused with the original M.I.T. software.
45  * M.I.T. makes no representations about the suitability of
46  * this software for any purpose.  It is provided "as is" without express
47  * or implied warranty.
48  *
49  *
50  * General definitions for Kerberos version 5.
51  */
52 
53 /*
54  * Copyright (C) 1998 by the FundsXpress, INC.
55  *
56  * All rights reserved.
57  *
58  * Export of this software from the United States of America may require
59  * a specific license from the United States Government.  It is the
60  * responsibility of any person or organization contemplating export to
61  * obtain such a license before exporting.
62  *
63  * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
64  * distribute this software and its documentation for any purpose and
65  * without fee is hereby granted, provided that the above copyright
66  * notice appear in all copies and that both that copyright notice and
67  * this permission notice appear in supporting documentation, and that
68  * the name of FundsXpress. not be used in advertising or publicity pertaining
69  * to distribution of the software without specific, written prior
70  * permission.  FundsXpress makes no representations about the suitability of
71  * this software for any purpose.  It is provided "as is" without express
72  * or implied warranty.
73  *
74  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
75  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
76  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
77  */
78 
79 #ifndef KRB5_GENERAL__
80 #define KRB5_GENERAL__
81 
82 #ifdef	_KERNEL
83 #include <sys/systm.h>
84 #include <sys/kmem.h>
85 
86 #include <sys/crypto/common.h>
87 #include <sys/crypto/api.h>
88 
89 /*
90  * Just to be safe lets make sure the buffers are zero'ed after
91  * malloc() as some code assumes this is the case.  To avoid warnings
92  * of duplicated defines let remove the old one if present.
93  */
94 #ifdef MALLOC
95 #undef MALLOC
96 #endif
97 #define MALLOC(n) kmem_zalloc((n), KM_SLEEP)
98 
99 #define	FREE(x, n) kmem_free((x), (n))
100 #define CALLOC(n, s) kmem_zalloc((n)*(s), KM_SLEEP)
101 #define strcpy(dst,src,n) bcopy((src),(dst),(n))
102 #define mutex_lock(lck)  mutex_enter(lck)
103 #define mutex_unlock(lck)  mutex_exit(lck)
104 
105 #else /* !_KERNEL */
106 #define	MALLOC(n) malloc(n)
107 #define	FREE(x, n) free(x)
108 #define CALLOC(n, s) calloc((n), (s))
109 #include <stdlib.h>
110 #include <thread.h>
111 #include <synch.h>
112 #include <security/cryptoki.h>
113 #include <limits.h>    /* for *_MAX */
114 #endif /* _KERNEL */
115 
116 /* By default, do not expose deprecated interfaces. */
117 /* SUNW14resync - we need to enable this for rlogind and such */
118 #ifndef KRB5_DEPRECATED
119 #define KRB5_DEPRECATED 1
120 #endif
121 /* Do not expose private interfaces.  Build system will override. */
122 /* SUNW14resync - for the Solaris build we set it to 1 here */
123 #ifndef KRB5_PRIVATE
124 #define KRB5_PRIVATE 1
125 #endif
126 
127 #if defined(__MACH__) && defined(__APPLE__)
128 #	include <TargetConditionals.h>
129 #    if TARGET_RT_MAC_CFM
130 #	error "Use KfM 4.0 SDK headers for CFM compilation."
131 #    endif
132 #endif
133 
134 #if defined(_MSDOS) || defined(_WIN32)
135 #include <win-mac.h>
136 #endif
137 
138 #ifndef KRB5_CONFIG__
139 #ifndef KRB5_CALLCONV
140 #define KRB5_CALLCONV
141 #define KRB5_CALLCONV_C
142 #endif /* !KRB5_CALLCONV */
143 #endif /* !KRB5_CONFIG__ */
144 
145 #ifndef KRB5_CALLCONV_WRONG
146 #define KRB5_CALLCONV_WRONG
147 #endif
148 
149 /* SUNW14resync XXX */
150 #include <sys/types.h>
151 #include <sys/socket.h>
152 
153 #ifndef THREEPARAMOPEN
154 #define THREEPARAMOPEN(x,y,z) open(x,y,z)
155 #endif
156 
157 
158 /*
159  * Solaris Kerberos:
160  *   Samba needs a couple of these interfaces so old crypto is enabled.
161  */
162 #define KRB5_OLD_CRYPTO
163 
164 
165 #ifndef KRB5INT_BEGIN_DECLS
166 #if defined(__cplusplus)
167 #define KRB5INT_BEGIN_DECLS	extern "C" {
168 #define KRB5INT_END_DECLS	}
169 #else
170 #define KRB5INT_BEGIN_DECLS
171 #define KRB5INT_END_DECLS
172 #endif
173 #endif
174 
175 #if TARGET_OS_MAC
176 #    pragma options align=mac68k
177 #endif
178 
179 /* from profile.h */
180 struct _profile_t;
181 /* typedef struct _profile_t *profile_t; */
182 
183 /*
184  * begin wordsize.h
185  */
186 
187 /*
188  * Word-size related definition.
189  */
190 
191 typedef	unsigned char	krb5_octet;
192 
193 #if INT_MAX == 0x7fff
194 typedef	int	krb5_int16;
195 typedef	unsigned int	krb5_ui_2;
196 #elif SHRT_MAX == 0x7fff
197 typedef	short	krb5_int16;
198 typedef	unsigned short	krb5_ui_2;
199 #else
200 #error undefined 16 bit type
201 #endif
202 
203 #if INT_MAX == 0x7fffffffL
204 typedef	int	krb5_int32;
205 typedef	unsigned int	krb5_ui_4;
206 #elif LONG_MAX == 0x7fffffffL
207 typedef	long	krb5_int32;
208 typedef	unsigned long	krb5_ui_4;
209 #elif SHRT_MAX == 0x7fffffffL
210 typedef	short	krb5_int32;
211 typedef	unsigned short	krb5_ui_4;
212 #else
213 #error: undefined 32 bit type
214 #endif
215 
216 #define VALID_INT_BITS	  INT_MAX
217 #define VALID_UINT_BITS	  UINT_MAX
218 
219 #define KRB5_INT32_MAX	2147483647
220 /* this strange form is necessary since - is a unary operator, not a sign
221    indicator */
222 #define KRB5_INT32_MIN	(-KRB5_INT32_MAX-1)
223 
224 #define KRB5_INT16_MAX 65535
225 /* this strange form is necessary since - is a unary operator, not a sign
226    indicator */
227 #define KRB5_INT16_MIN	(-KRB5_INT16_MAX-1)
228 
229 /*
230  * end wordsize.h
231  */
232 
233 /*
234  * begin "base-defs.h"
235  */
236 
237 /*
238  * Basic definitions for Kerberos V5 library
239  */
240 
241 #ifndef FALSE
242 #define	FALSE	0
243 #endif
244 #ifndef TRUE
245 #define	TRUE	1
246 #endif
247 
248 typedef	unsigned int krb5_boolean;
249 typedef	unsigned int krb5_msgtype;
250 typedef	unsigned int krb5_kvno;
251 
252 typedef	krb5_int32 krb5_addrtype;
253 typedef krb5_int32 krb5_enctype;
254 typedef krb5_int32 krb5_cksumtype;
255 typedef krb5_int32 krb5_authdatatype;
256 typedef krb5_int32 krb5_keyusage;
257 
258 typedef krb5_int32	krb5_preauthtype; /* This may change, later on */
259 typedef	krb5_int32	krb5_flags;
260 typedef krb5_int32	krb5_timestamp;
261 typedef	krb5_int32	krb5_error_code;
262 typedef krb5_int32	krb5_deltat;
263 
264 typedef krb5_error_code	krb5_magic;
265 
266 typedef struct _krb5_data {
267 	krb5_magic magic;
268 	unsigned int length;
269 	char *data;
270 } krb5_data;
271 
272 typedef struct _krb5_octet_data {
273 	krb5_magic magic;
274 	unsigned int length;
275 	krb5_octet *data;
276 } krb5_octet_data;
277 
278 /*
279  * Hack length for crypto library to use the afs_string_to_key It is
280  * equivalent to -1 without possible sign extension
281  * We also overload for an unset salt type length - which is also -1, but
282  * hey, why not....
283 */
284 #define SALT_TYPE_AFS_LENGTH UINT_MAX
285 #define SALT_TYPE_NO_LENGTH  UINT_MAX
286 
287 typedef	void * krb5_pointer;
288 typedef void const * krb5_const_pointer;
289 
290 typedef struct krb5_principal_data {
291     krb5_magic magic;
292     krb5_data realm;
293     krb5_data *data;		/* An array of strings */
294     krb5_int32 length;
295     krb5_int32 type;
296 } krb5_principal_data;
297 
298 typedef	krb5_principal_data * krb5_principal;
299 
300 /*
301  * Per V5 spec on definition of principal types
302  */
303 
304 /* Name type not known */
305 #define KRB5_NT_UNKNOWN		0
306 /* Just the name of the principal as in DCE, or for users */
307 #define KRB5_NT_PRINCIPAL	1
308 /* Service and other unique instance (krbtgt) */
309 #define KRB5_NT_SRV_INST	2
310 /* Service with host name as instance (telnet, rcommands) */
311 #define KRB5_NT_SRV_HST		3
312 /* Service with host as remaining components */
313 #define KRB5_NT_SRV_XHST	4
314 /* Unique ID */
315 #define KRB5_NT_UID		5
316 
317 /* constant version thereof: */
318 typedef const krb5_principal_data *krb5_const_principal;
319 
320 #define krb5_princ_realm(context, princ) (&(princ)->realm)
321 #define krb5_princ_set_realm(context, princ,value) ((princ)->realm = *(value))
322 #define krb5_princ_set_realm_length(context, princ,value) (princ)->realm.length = (value)
323 #define krb5_princ_set_realm_data(context, princ,value) (princ)->realm.data = (value)
324 #define	krb5_princ_size(context, princ) (princ)->length
325 #define	krb5_princ_type(context, princ) (princ)->type
326 #define	krb5_princ_name(context, princ) (princ)->data
327 #define	krb5_princ_component(context, princ,i)		\
328 	    (((i) < krb5_princ_size(context, princ))	\
329 	     ? (princ)->data + (i)			\
330 	     : NULL)
331 
332 /*
333  * Constants for realm referrals.
334  */
335 #define        KRB5_REFERRAL_REALM	""
336 
337 /*
338  * Referral-specific functions.
339  */
340 krb5_boolean KRB5_CALLCONV krb5_is_referral_realm(const krb5_data *);
341 
342 /*
343  * end "base-defs.h"
344  */
345 
346 /*
347  * begin "hostaddr.h"
348  */
349 
350 /* structure for address */
351 typedef struct _krb5_address {
352     krb5_magic magic;
353     krb5_addrtype addrtype;
354     unsigned int length;
355     krb5_octet *contents;
356 } krb5_address;
357 
358 /* per Kerberos v5 protocol spec */
359 #define	ADDRTYPE_INET		0x0002
360 #define	ADDRTYPE_CHAOS		0x0005
361 #define	ADDRTYPE_XNS		0x0006
362 #define	ADDRTYPE_ISO		0x0007
363 #define ADDRTYPE_DDP		0x0010
364 #define ADDRTYPE_INET6		0x0018
365 /* not yet in the spec... */
366 #define ADDRTYPE_ADDRPORT	0x0100
367 #define ADDRTYPE_IPPORT		0x0101
368 
369 /* macros to determine if a type is a local type */
370 #define ADDRTYPE_IS_LOCAL(addrtype) (addrtype & 0x8000)
371 
372 /*
373  * end "hostaddr.h"
374  */
375 
376 
377 struct _krb5_context;
378 typedef struct _krb5_context * krb5_context;
379 
380 struct _krb5_auth_context;
381 typedef struct _krb5_auth_context * krb5_auth_context;
382 
383 struct _krb5_cryptosystem_entry;
384 
385 /* SUNW EF (I assume) crypto mods ... */
386 struct _krb5_keyblock;
387 
388 /*
389  * keyblocks will contain a list of derived keys,
390  * this  structure will contain the derived key data.
391  */
392 typedef struct _dk_node {
393     krb5_keyusage   usage;
394     struct _krb5_keyblock   *derived_key;
395     uchar_t         dkid; /* derived key identifier byte */
396     struct _dk_node *next;
397 } krb5_dk_node;
398 
399 /*
400  * begin "encryption.h"
401  */
402 
403 typedef struct _krb5_keyblock {
404     krb5_magic magic;
405     krb5_enctype enctype;
406     unsigned int length;
407     krb5_octet *contents;
408     krb5_dk_node   *dk_list; /* list of keys derived from this key */
409 #ifdef _KERNEL
410     crypto_mech_type_t     kef_mt;
411     crypto_key_t           kef_key;
412     crypto_ctx_template_t  key_tmpl;
413 #else
414     CK_OBJECT_HANDLE       hKey; /* PKCS#11 key object handle */
415     pid_t	pid; /* fork safety */
416 #endif /* _KERNEL */
417 } krb5_keyblock;
418 
419 typedef struct _krb5_checksum {
420     krb5_magic magic;
421     krb5_cksumtype checksum_type;	/* checksum type */
422     unsigned int length;
423     krb5_octet *contents;
424 } krb5_checksum;
425 
426 typedef struct _krb5_encrypt_block {
427     krb5_magic magic;
428     krb5_enctype crypto_entry;		/* to call krb5_encrypt_size, you need
429 					   this.  it was a pointer, but it
430 					   doesn't have to be.  gross. */
431     krb5_keyblock *key;
432 } krb5_encrypt_block;
433 
434 typedef struct _krb5_enc_data {
435     krb5_magic magic;
436     krb5_enctype enctype;
437     krb5_kvno kvno;
438     krb5_data ciphertext;
439 } krb5_enc_data;
440 
441 /* per Kerberos v5 protocol spec */
442 #define	ENCTYPE_NULL		0x0000
443 #define	ENCTYPE_DES_CBC_CRC	0x0001	/* DES cbc mode with CRC-32 */
444 #define	ENCTYPE_DES_CBC_MD4	0x0002	/* DES cbc mode with RSA-MD4 */
445 #define	ENCTYPE_DES_CBC_MD5	0x0003	/* DES cbc mode with RSA-MD5 */
446 #define	ENCTYPE_DES_CBC_RAW	0x0004	/* DES cbc mode raw */
447 /* XXX deprecated? */
448 #define	ENCTYPE_DES3_CBC_SHA	0x0005	/* DES-3 cbc mode with NIST-SHA */
449 #define	ENCTYPE_DES3_CBC_RAW	0x0006	/* DES-3 cbc mode raw */
450 #define ENCTYPE_DES_HMAC_SHA1	0x0008
451 #define ENCTYPE_DES3_CBC_SHA1	0x0010
452 #define ENCTYPE_AES128_CTS_HMAC_SHA1_96	0x0011
453 #define ENCTYPE_AES256_CTS_HMAC_SHA1_96	0x0012
454 #define ENCTYPE_ARCFOUR_HMAC	0x0017
455 #define ENCTYPE_ARCFOUR_HMAC_EXP 0x0018
456 #define ENCTYPE_UNKNOWN		0x01ff
457 
458 #define	CKSUMTYPE_CRC32		0x0001
459 #define	CKSUMTYPE_RSA_MD4	0x0002
460 #define	CKSUMTYPE_RSA_MD4_DES	0x0003
461 #define	CKSUMTYPE_DESCBC	0x0004
462 /* des-mac-k */
463 /* rsa-md4-des-k */
464 #define	CKSUMTYPE_RSA_MD5	0x0007
465 #define	CKSUMTYPE_RSA_MD5_DES	0x0008
466 #define CKSUMTYPE_NIST_SHA	0x0009
467 #define CKSUMTYPE_HMAC_SHA1_DES3	0x000c
468 #define CKSUMTYPE_HMAC_SHA1_96_AES128	0x000f
469 #define CKSUMTYPE_HMAC_SHA1_96_AES256	0x0010
470 #define CKSUMTYPE_HMAC_MD5_ARCFOUR -138 /*Microsoft md5 hmac cksumtype*/
471 
472 /* The following are entropy source designations. Whenever
473  * krb5_C_random_add_entropy is called, one of these source  ids is passed
474  * in.  This  allows the library  to better estimate bits of
475  * entropy in the sample and to keep track of what sources of entropy have
476  * contributed enough entropy.  Sources marked internal MUST NOT be
477  * used by applications outside the Kerberos library
478 */
479 
480 enum {
481   KRB5_C_RANDSOURCE_OLDAPI = 0, /*calls to krb5_C_RANDOM_SEED (INTERNAL)*/
482   KRB5_C_RANDSOURCE_OSRAND = 1, /* /dev/random or equivalent (internal)*/
483   KRB5_C_RANDSOURCE_TRUSTEDPARTY = 2, /* From KDC or other trusted party*/
484   /*This source should be used carefully; data in this category
485    * should be from a third party trusted to give random bits
486    * For example keys issued by the KDC in the application server.
487    */
488   KRB5_C_RANDSOURCE_TIMING = 3, /* Timing of operations*/
489   KRB5_C_RANDSOURCE_EXTERNAL_PROTOCOL = 4, /*Protocol data possibly from attacker*/
490   KRB5_C_RANDSOURCE_MAX = 5 /*Do not use; maximum source ID*/
491 };
492 
493 #ifndef krb5_roundup
494 /* round x up to nearest multiple of y */
495 #define krb5_roundup(x, y) ((((x) + (y) - 1)/(y))*(y))
496 #endif /* roundup */
497 
498 /* macro function definitions to help clean up code */
499 
500 #ifndef _KERNEL
501 #define krb5_x(ptr,args) ((ptr)?((*(ptr)) args):(abort(),1))
502 #define krb5_xc(ptr,args) ((ptr)?((*(ptr)) args):(abort(),(char*)0))
503 #else
504 #define krb5_x(ptr,args) ((*(ptr)) args)
505 #define krb5_xc(ptr,args) ((*(ptr)) args)
506 #endif
507 
508 krb5_error_code KRB5_CALLCONV
509     krb5_c_encrypt
510     (krb5_context context, const krb5_keyblock *key,
511 		    krb5_keyusage usage, const krb5_data *cipher_state,
512 		    const krb5_data *input, krb5_enc_data *output);
513 
514 krb5_error_code KRB5_CALLCONV
515     krb5_c_decrypt
516     (krb5_context context, const krb5_keyblock *key,
517 		    krb5_keyusage usage, const krb5_data *cipher_state,
518 		    const krb5_enc_data *input, krb5_data *output);
519 
520 krb5_error_code KRB5_CALLCONV
521     krb5_c_encrypt_length
522     (krb5_context context, krb5_enctype enctype,
523 		    size_t inputlen, size_t *length);
524 
525 krb5_error_code KRB5_CALLCONV
526     krb5_c_block_size
527     (krb5_context context, krb5_enctype enctype,
528 		    size_t *blocksize);
529 
530 krb5_error_code KRB5_CALLCONV
531     krb5_c_keylengths
532     (krb5_context context, krb5_enctype enctype,
533                     size_t *keybytes, size_t *keylength);
534 
535 krb5_error_code KRB5_CALLCONV
536 	krb5_c_init_state(krb5_context,
537 		const krb5_keyblock *, krb5_keyusage,
538 		krb5_data *);
539 
540 krb5_error_code KRB5_CALLCONV
541 	krb5_c_free_state(krb5_context,
542 		const krb5_keyblock *, krb5_data *);
543 
544 krb5_error_code KRB5_CALLCONV
545     krb5_c_make_random_key
546     (krb5_context context, krb5_enctype enctype,
547 		    krb5_keyblock *random_key);
548 
549 krb5_error_code KRB5_CALLCONV
550     krb5_c_random_to_key
551     (krb5_context context, krb5_enctype enctype,
552                     krb5_data *random_data, krb5_keyblock *k5_random_key);
553 
554 /* Register a new entropy sample  with the PRNG. may cause
555 * the PRNG to be reseeded, although this is not guaranteed.  See previous randsource definitions
556 * for information on how each source should be used.
557 */
558 krb5_error_code KRB5_CALLCONV
559         krb5_c_random_add_entropy
560 (krb5_context context, unsigned int  randsource_id, const krb5_data *data);
561 
562 krb5_error_code KRB5_CALLCONV
563     krb5_c_random_make_octets
564     (krb5_context context, krb5_data *data);
565 
566 /*
567 * Collect entropy from the OS if possible. strong requests that as strong
568 * of a source of entropy  as available be used.  Setting strong may
569 * increase the probability of blocking and should not  be used for normal
570 * applications.  Good uses include seeding the PRNG for kadmind
571 * and realm setup.
572 * If successful is non-null, then successful is set to 1 if the OS provided
573 * entropy else zero.
574 */
575 #if 0 /* SUNW14resync - not used in Solaris */
576 krb5_error_code KRB5_CALLCONV
577 krb5_c_random_os_entropy
578 (krb5_context context, int strong, int *success);
579 #endif
580 
581 /*deprecated*/ krb5_error_code KRB5_CALLCONV
582     krb5_c_random_seed
583     (krb5_context context, krb5_data *data);
584 
585 krb5_error_code KRB5_CALLCONV
586     krb5_c_string_to_key
587     (krb5_context context, krb5_enctype enctype,
588 		    const krb5_data *string, const krb5_data *salt,
589 		    krb5_keyblock *key);
590 krb5_error_code KRB5_CALLCONV
591 krb5_c_string_to_key_with_params(krb5_context context,
592 				 krb5_enctype enctype,
593 				 const krb5_data *string,
594 				 const krb5_data *salt,
595 				 const krb5_data *params,
596 				 krb5_keyblock *key);
597 
598 krb5_error_code KRB5_CALLCONV
599     krb5_c_enctype_compare
600     (krb5_context context, krb5_enctype e1, krb5_enctype e2,
601 		    krb5_boolean *similar);
602 
603 krb5_error_code KRB5_CALLCONV
604     krb5_c_make_checksum
605     (krb5_context context, krb5_cksumtype cksumtype,
606 		    const krb5_keyblock *key, krb5_keyusage usage,
607 		    const krb5_data *input, krb5_checksum *cksum);
608 
609 krb5_error_code KRB5_CALLCONV
610     krb5_c_verify_checksum
611     (krb5_context context,
612 		    const krb5_keyblock *key, krb5_keyusage usage,
613 		    const krb5_data *data,
614 		    const krb5_checksum *cksum,
615 		    krb5_boolean *valid);
616 
617 krb5_error_code KRB5_CALLCONV
618     krb5_c_checksum_length
619     (krb5_context context, krb5_cksumtype cksumtype,
620 		    size_t *length);
621 
622 krb5_error_code KRB5_CALLCONV
623     krb5_c_keyed_checksum_types
624     (krb5_context context, krb5_enctype enctype,
625 		    unsigned int *count, krb5_cksumtype **cksumtypes);
626 
627 #define KRB5_KEYUSAGE_AS_REQ_PA_ENC_TS		1
628 #define KRB5_KEYUSAGE_KDC_REP_TICKET		2
629 #define KRB5_KEYUSAGE_AS_REP_ENCPART		3
630 #define KRB5_KEYUSAGE_TGS_REQ_AD_SESSKEY	4
631 #define KRB5_KEYUSAGE_TGS_REQ_AD_SUBKEY		5
632 #define KRB5_KEYUSAGE_TGS_REQ_AUTH_CKSUM	6
633 #define KRB5_KEYUSAGE_TGS_REQ_AUTH		7
634 #define KRB5_KEYUSAGE_TGS_REP_ENCPART_SESSKEY	8
635 #define KRB5_KEYUSAGE_TGS_REP_ENCPART_SUBKEY	9
636 #define KRB5_KEYUSAGE_AP_REQ_AUTH_CKSUM		10
637 #define KRB5_KEYUSAGE_AP_REQ_AUTH		11
638 #define KRB5_KEYUSAGE_AP_REP_ENCPART		12
639 #define KRB5_KEYUSAGE_KRB_PRIV_ENCPART		13
640 #define KRB5_KEYUSAGE_KRB_CRED_ENCPART		14
641 #define KRB5_KEYUSAGE_KRB_SAFE_CKSUM		15
642 #define KRB5_KEYUSAGE_APP_DATA_ENCRYPT		16
643 #define KRB5_KEYUSAGE_APP_DATA_CKSUM		17
644 #define KRB5_KEYUSAGE_KRB_ERROR_CKSUM		18
645 #define KRB5_KEYUSAGE_AD_KDCISSUED_CKSUM	19
646 #define KRB5_KEYUSAGE_AD_MTE			20
647 #define KRB5_KEYUSAGE_AD_ITE			21
648 
649 /* XXX need to register these */
650 
651 #define KRB5_KEYUSAGE_GSS_TOK_MIC		22
652 #define KRB5_KEYUSAGE_GSS_TOK_WRAP_INTEG	23
653 #define KRB5_KEYUSAGE_GSS_TOK_WRAP_PRIV		24
654 
655 /* Defined in hardware preauth draft */
656 
657 #define KRB5_KEYUSAGE_PA_SAM_CHALLENGE_CKSUM	25
658 #define KRB5_KEYUSAGE_PA_SAM_CHALLENGE_TRACKID	26
659 #define KRB5_KEYUSAGE_PA_SAM_RESPONSE		27
660 
661 /* Defined in KDC referrals draft */
662 #define KRB5_KEYUSAGE_PA_REFERRAL		26 /* XXX note conflict with above */
663 
664 krb5_boolean KRB5_CALLCONV krb5_c_valid_enctype
665 	(krb5_enctype ktype);
666 krb5_boolean KRB5_CALLCONV krb5_c_valid_cksumtype
667 	(krb5_cksumtype ctype);
668 krb5_boolean KRB5_CALLCONV krb5_c_is_coll_proof_cksum
669 	(krb5_cksumtype ctype);
670 krb5_boolean KRB5_CALLCONV krb5_c_is_keyed_cksum
671 	(krb5_cksumtype ctype);
672 
673 #if KRB5_PRIVATE
674 /* Use the above four instead.  */
675 krb5_boolean KRB5_CALLCONV valid_enctype
676 	(krb5_enctype ktype);
677 krb5_boolean KRB5_CALLCONV valid_cksumtype
678 	(krb5_cksumtype ctype);
679 krb5_boolean KRB5_CALLCONV is_coll_proof_cksum
680 	(krb5_cksumtype ctype);
681 krb5_boolean KRB5_CALLCONV is_keyed_cksum
682 	(krb5_cksumtype ctype);
683 #endif
684 
685 #ifdef KRB5_OLD_CRYPTO
686 /*
687  * old cryptosystem routine prototypes.  These are now layered
688  * on top of the functions above.
689  */
690 krb5_error_code KRB5_CALLCONV krb5_encrypt
691 	(krb5_context context,
692 		krb5_const_pointer inptr,
693 		krb5_pointer outptr,
694 		size_t size,
695 		krb5_encrypt_block * eblock,
696 		krb5_pointer ivec);
697 krb5_error_code KRB5_CALLCONV krb5_decrypt
698 	(krb5_context context,
699 		krb5_const_pointer inptr,
700 		krb5_pointer outptr,
701 		size_t size,
702 		krb5_encrypt_block * eblock,
703 		krb5_pointer ivec);
704 krb5_error_code KRB5_CALLCONV krb5_process_key
705 	(krb5_context context,
706 		krb5_encrypt_block * eblock,
707 		const krb5_keyblock * key);
708 krb5_error_code KRB5_CALLCONV krb5_finish_key
709 	(krb5_context context,
710 		krb5_encrypt_block * eblock);
711 krb5_error_code KRB5_CALLCONV krb5_string_to_key
712 	(krb5_context context,
713 		const krb5_encrypt_block * eblock,
714 		krb5_keyblock * keyblock,
715 		const krb5_data * data,
716 		const krb5_data * salt);
717 krb5_error_code KRB5_CALLCONV krb5_init_random_key
718 	(krb5_context context,
719 		const krb5_encrypt_block * eblock,
720 		const krb5_keyblock * keyblock,
721 		krb5_pointer * ptr);
722 krb5_error_code KRB5_CALLCONV krb5_finish_random_key
723 	(krb5_context context,
724 		const krb5_encrypt_block * eblock,
725 		krb5_pointer * ptr);
726 krb5_error_code KRB5_CALLCONV krb5_random_key
727 	(krb5_context context,
728 		const krb5_encrypt_block * eblock,
729 		krb5_pointer ptr,
730 		krb5_keyblock ** keyblock);
731 krb5_enctype KRB5_CALLCONV krb5_eblock_enctype
732 	(krb5_context context,
733 		const krb5_encrypt_block * eblock);
734 krb5_error_code KRB5_CALLCONV krb5_use_enctype
735 	(krb5_context context,
736 		krb5_encrypt_block * eblock,
737 		krb5_enctype enctype);
738 size_t KRB5_CALLCONV krb5_encrypt_size
739 	(size_t length,
740 		krb5_enctype crypto);
741 size_t KRB5_CALLCONV krb5_checksum_size
742 	(krb5_context context,
743 		krb5_cksumtype ctype);
744 krb5_error_code KRB5_CALLCONV krb5_calculate_checksum
745 	(krb5_context context,
746 		krb5_cksumtype ctype,
747 		krb5_const_pointer in, size_t in_length,
748 		krb5_const_pointer seed, size_t seed_length,
749 		krb5_checksum * outcksum);
750 krb5_error_code KRB5_CALLCONV krb5_verify_checksum
751 	(krb5_context context,
752 		krb5_cksumtype ctype,
753 		const krb5_checksum * cksum,
754 		krb5_const_pointer in, size_t in_length,
755 		krb5_const_pointer seed, size_t seed_length);
756 
757 #if KRB5_PRIVATE
758 krb5_error_code KRB5_CALLCONV krb5_random_confounder
759 	(size_t, krb5_pointer);
760 
761 krb5_error_code krb5_encrypt_data
762 	(krb5_context context, krb5_keyblock *key,
763 		krb5_pointer ivec, krb5_data *data,
764 		krb5_enc_data *enc_data);
765 
766 krb5_error_code krb5_decrypt_data
767 	(krb5_context context, krb5_keyblock *key,
768 		krb5_pointer ivec, krb5_enc_data *data,
769 		krb5_data *enc_data);
770 #endif
771 
772 #endif /* KRB5_OLD_CRYPTO */
773 
774 /*
775  * end "encryption.h"
776  */
777 
778 /*
779  * begin "fieldbits.h"
780  */
781 
782 /* kdc_options for kdc_request */
783 /* options is 32 bits; each host is responsible to put the 4 bytes
784    representing these bits into net order before transmission */
785 /* #define	KDC_OPT_RESERVED	0x80000000 */
786 #define	KDC_OPT_FORWARDABLE		0x40000000
787 #define	KDC_OPT_FORWARDED		0x20000000
788 #define	KDC_OPT_PROXIABLE		0x10000000
789 #define	KDC_OPT_PROXY			0x08000000
790 #define	KDC_OPT_ALLOW_POSTDATE		0x04000000
791 #define	KDC_OPT_POSTDATED		0x02000000
792 /* #define	KDC_OPT_UNUSED		0x01000000 */
793 #define	KDC_OPT_RENEWABLE		0x00800000
794 /* #define	KDC_OPT_UNUSED		0x00400000 */
795 /* #define	KDC_OPT_RESERVED	0x00200000 */
796 /* #define	KDC_OPT_RESERVED	0x00100000 */
797 /* #define	KDC_OPT_RESERVED	0x00080000 */
798 /* #define	KDC_OPT_RESERVED	0x00040000 */
799 #define	KDC_OPT_REQUEST_ANONYMOUS	0x00020000
800 #define	KDC_OPT_CANONICALIZE		0x00010000
801 /* #define	KDC_OPT_RESERVED	0x00008000 */
802 /* #define	KDC_OPT_RESERVED	0x00004000 */
803 /* #define	KDC_OPT_RESERVED	0x00002000 */
804 /* #define	KDC_OPT_RESERVED	0x00001000 */
805 /* #define	KDC_OPT_RESERVED	0x00000800 */
806 /* #define	KDC_OPT_RESERVED	0x00000400 */
807 /* #define	KDC_OPT_RESERVED	0x00000200 */
808 /* #define	KDC_OPT_RESERVED	0x00000100 */
809 /* #define	KDC_OPT_RESERVED	0x00000080 */
810 /* #define	KDC_OPT_RESERVED	0x00000040 */
811 #define	KDC_OPT_DISABLE_TRANSITED_CHECK	0x00000020
812 #define	KDC_OPT_RENEWABLE_OK		0x00000010
813 #define	KDC_OPT_ENC_TKT_IN_SKEY		0x00000008
814 /* #define	KDC_OPT_UNUSED		0x00000004 */
815 #define	KDC_OPT_RENEW			0x00000002
816 #define	KDC_OPT_VALIDATE		0x00000001
817 
818 /*
819  * Mask of ticket flags in the TGT which should be converted into KDC
820  * options when using the TGT to get derivitive tickets.
821  *
822  *  New mask = KDC_OPT_FORWARDABLE | KDC_OPT_PROXIABLE |
823  *	       KDC_OPT_ALLOW_POSTDATE | KDC_OPT_RENEWABLE
824  */
825 #define KDC_TKT_COMMON_MASK		0x54800000
826 
827 /* definitions for ap_options fields */
828 /* ap_options are 32 bits; each host is responsible to put the 4 bytes
829    representing these bits into net order before transmission */
830 #define	AP_OPTS_RESERVED		0x80000000
831 #define	AP_OPTS_USE_SESSION_KEY		0x40000000
832 #define	AP_OPTS_MUTUAL_REQUIRED		0x20000000
833 /* #define	AP_OPTS_RESERVED	0x10000000 */
834 /* #define	AP_OPTS_RESERVED	0x08000000 */
835 /* #define	AP_OPTS_RESERVED	0x04000000 */
836 /* #define	AP_OPTS_RESERVED	0x02000000 */
837 /* #define	AP_OPTS_RESERVED	0x01000000 */
838 /* #define	AP_OPTS_RESERVED	0x00800000 */
839 /* #define	AP_OPTS_RESERVED	0x00400000 */
840 /* #define	AP_OPTS_RESERVED	0x00200000 */
841 /* #define	AP_OPTS_RESERVED	0x00100000 */
842 /* #define	AP_OPTS_RESERVED	0x00080000 */
843 /* #define	AP_OPTS_RESERVED	0x00040000 */
844 /* #define	AP_OPTS_RESERVED	0x00020000 */
845 /* #define	AP_OPTS_RESERVED	0x00010000 */
846 /* #define	AP_OPTS_RESERVED	0x00008000 */
847 /* #define	AP_OPTS_RESERVED	0x00004000 */
848 /* #define	AP_OPTS_RESERVED	0x00002000 */
849 /* #define	AP_OPTS_RESERVED	0x00001000 */
850 /* #define	AP_OPTS_RESERVED	0x00000800 */
851 /* #define	AP_OPTS_RESERVED	0x00000400 */
852 /* #define	AP_OPTS_RESERVED	0x00000200 */
853 /* #define	AP_OPTS_RESERVED	0x00000100 */
854 /* #define	AP_OPTS_RESERVED	0x00000080 */
855 /* #define	AP_OPTS_RESERVED	0x00000040 */
856 /* #define	AP_OPTS_RESERVED	0x00000020 */
857 /* #define	AP_OPTS_RESERVED	0x00000010 */
858 /* #define	AP_OPTS_RESERVED	0x00000008 */
859 /* #define	AP_OPTS_RESERVED	0x00000004 */
860 /* #define	AP_OPTS_RESERVED	0x00000002 */
861 #define AP_OPTS_USE_SUBKEY	0x00000001
862 
863 #define AP_OPTS_WIRE_MASK	0xfffffff0
864 
865 /* definitions for ad_type fields. */
866 #define	AD_TYPE_RESERVED	0x8000
867 #define	AD_TYPE_EXTERNAL	0x4000
868 #define	AD_TYPE_REGISTERED	0x2000
869 
870 #define AD_TYPE_FIELD_TYPE_MASK	0x1fff
871 
872 /* Ticket flags */
873 /* flags are 32 bits; each host is responsible to put the 4 bytes
874    representing these bits into net order before transmission */
875 /* #define	TKT_FLG_RESERVED	0x80000000 */
876 #define	TKT_FLG_FORWARDABLE		0x40000000
877 #define	TKT_FLG_FORWARDED		0x20000000
878 #define	TKT_FLG_PROXIABLE		0x10000000
879 #define	TKT_FLG_PROXY			0x08000000
880 #define	TKT_FLG_MAY_POSTDATE		0x04000000
881 #define	TKT_FLG_POSTDATED		0x02000000
882 #define	TKT_FLG_INVALID			0x01000000
883 #define	TKT_FLG_RENEWABLE		0x00800000
884 #define	TKT_FLG_INITIAL			0x00400000
885 #define	TKT_FLG_PRE_AUTH		0x00200000
886 #define	TKT_FLG_HW_AUTH			0x00100000
887 #define	TKT_FLG_TRANSIT_POLICY_CHECKED	0x00080000
888 #define	TKT_FLG_OK_AS_DELEGATE		0x00040000
889 #define	TKT_FLG_ANONYMOUS		0x00020000
890 /* #define	TKT_FLG_RESERVED	0x00010000 */
891 /* #define	TKT_FLG_RESERVED	0x00008000 */
892 /* #define	TKT_FLG_RESERVED	0x00004000 */
893 /* #define	TKT_FLG_RESERVED	0x00002000 */
894 /* #define	TKT_FLG_RESERVED	0x00001000 */
895 /* #define	TKT_FLG_RESERVED	0x00000800 */
896 /* #define	TKT_FLG_RESERVED	0x00000400 */
897 /* #define	TKT_FLG_RESERVED	0x00000200 */
898 /* #define	TKT_FLG_RESERVED	0x00000100 */
899 /* #define	TKT_FLG_RESERVED	0x00000080 */
900 /* #define	TKT_FLG_RESERVED	0x00000040 */
901 /* #define	TKT_FLG_RESERVED	0x00000020 */
902 /* #define	TKT_FLG_RESERVED	0x00000010 */
903 /* #define	TKT_FLG_RESERVED	0x00000008 */
904 /* #define	TKT_FLG_RESERVED	0x00000004 */
905 /* #define	TKT_FLG_RESERVED	0x00000002 */
906 /* #define	TKT_FLG_RESERVED	0x00000001 */
907 
908 /* definitions for lr_type fields. */
909 #define	LR_TYPE_THIS_SERVER_ONLY	0x8000
910 
911 #define LR_TYPE_INTERPRETATION_MASK	0x7fff
912 
913 /* definitions for ad_type fields. */
914 #define	AD_TYPE_EXTERNAL	0x4000
915 #define	AD_TYPE_REGISTERED	0x2000
916 
917 #define AD_TYPE_FIELD_TYPE_MASK	0x1fff
918 #define AD_TYPE_INTERNAL_MASK	0x3fff
919 
920 /* definitions for msec direction bit for KRB_SAFE, KRB_PRIV */
921 #define	MSEC_DIRBIT		0x8000
922 #define	MSEC_VAL_MASK		0x7fff
923 
924 /*
925  * end "fieldbits.h"
926  */
927 
928 /*
929  * begin "proto.h"
930  */
931 
932 /* Protocol version number */
933 #define	KRB5_PVNO	5
934 
935 /* Message types */
936 
937 #define	KRB5_AS_REQ	((krb5_msgtype)10) /* Req for initial authentication */
938 #define	KRB5_AS_REP	((krb5_msgtype)11) /* Response to KRB_AS_REQ request */
939 #define	KRB5_TGS_REQ	((krb5_msgtype)12) /* TGS request to server */
940 #define	KRB5_TGS_REP	((krb5_msgtype)13) /* Response to KRB_TGS_REQ req */
941 #define	KRB5_AP_REQ	((krb5_msgtype)14) /* application request to server */
942 #define	KRB5_AP_REP	((krb5_msgtype)15) /* Response to KRB_AP_REQ_MUTUAL */
943 #define	KRB5_SAFE	((krb5_msgtype)20) /* Safe application message */
944 #define	KRB5_PRIV	((krb5_msgtype)21) /* Private application message */
945 #define	KRB5_CRED	((krb5_msgtype)22) /* Credential forwarding message */
946 #define	KRB5_ERROR	((krb5_msgtype)30) /* Error response */
947 
948 /* LastReq types */
949 #define KRB5_LRQ_NONE			0
950 #define KRB5_LRQ_ALL_LAST_TGT		1
951 #define KRB5_LRQ_ONE_LAST_TGT		(-1)
952 #define KRB5_LRQ_ALL_LAST_INITIAL	2
953 #define KRB5_LRQ_ONE_LAST_INITIAL	(-2)
954 #define KRB5_LRQ_ALL_LAST_TGT_ISSUED	3
955 #define KRB5_LRQ_ONE_LAST_TGT_ISSUED	(-3)
956 #define KRB5_LRQ_ALL_LAST_RENEWAL	4
957 #define KRB5_LRQ_ONE_LAST_RENEWAL	(-4)
958 #define KRB5_LRQ_ALL_LAST_REQ		5
959 #define KRB5_LRQ_ONE_LAST_REQ		(-5)
960 #define KRB5_LRQ_ALL_PW_EXPTIME		6
961 #define KRB5_LRQ_ONE_PW_EXPTIME		(-6)
962 
963 /* PADATA types */
964 #define KRB5_PADATA_NONE		0
965 #define	KRB5_PADATA_AP_REQ		1
966 #define	KRB5_PADATA_TGS_REQ		KRB5_PADATA_AP_REQ
967 #define KRB5_PADATA_ENC_TIMESTAMP	2
968 #define	KRB5_PADATA_PW_SALT		3
969 #if 0				/* Not used */
970 #define KRB5_PADATA_ENC_ENCKEY		4  /* Key encrypted within itself */
971 #endif
972 #define KRB5_PADATA_ENC_UNIX_TIME	5  /* timestamp encrypted in key */
973 #define KRB5_PADATA_ENC_SANDIA_SECURID	6  /* SecurId passcode */
974 #define KRB5_PADATA_SESAME		7  /* Sesame project */
975 #define KRB5_PADATA_OSF_DCE		8  /* OSF DCE */
976 #define KRB5_CYBERSAFE_SECUREID		9  /* Cybersafe */
977 #define	KRB5_PADATA_AFS3_SALT		10 /* Cygnus */
978 #define KRB5_PADATA_ETYPE_INFO		11 /* Etype info for preauth */
979 #define KRB5_PADATA_SAM_CHALLENGE	12 /* draft challenge system */
980 #define KRB5_PADATA_SAM_RESPONSE	13 /* draft challenge system response */
981 #define KRB5_PADATA_PK_AS_REQ_OLD	14 /* PKINIT */
982 #define KRB5_PADATA_PK_AS_REP_OLD	15 /* PKINIT */
983 #define KRB5_PADATA_PK_AS_REQ		16 /* PKINIT */
984 #define KRB5_PADATA_PK_AS_REP		17 /* PKINIT */
985 #define KRB5_PADATA_ETYPE_INFO2 	19
986 #define KRB5_PADATA_REFERRAL		25 /* draft referral system */
987 #define KRB5_PADATA_SAM_CHALLENGE_2	30 /* draft challenge system, updated */
988 #define KRB5_PADATA_SAM_RESPONSE_2	31 /* draft challenge system, updated */
989 
990 #define	KRB5_SAM_USE_SAD_AS_KEY		0x80000000
991 #define	KRB5_SAM_SEND_ENCRYPTED_SAD	0x40000000
992 #define	KRB5_SAM_MUST_PK_ENCRYPT_SAD	0x20000000 /* currently must be zero */
993 
994 /* Reserved for SPX pre-authentication. */
995 #define KRB5_PADATA_DASS		16
996 
997 /* Transited encoding types */
998 #define	KRB5_DOMAIN_X500_COMPRESS	1
999 
1000 /* alternate authentication types */
1001 #define	KRB5_ALTAUTH_ATT_CHALLENGE_RESPONSE	64
1002 
1003 /* authorization data types */
1004 #define KRB5_AUTHDATA_IF_RELEVANT   1
1005 #define KRB5_AUTHDATA_KDC_ISSUED    4
1006 #define KRB5_AUTHDATA_AND_OR        5
1007 #define KRB5_AUTHDATA_MANDATORY_FOR_KDC 8
1008 #define KRB5_AUTHDATA_INITIAL_VERIFIED_CAS      9
1009 #define	KRB5_AUTHDATA_OSF_DCE	64
1010 #define KRB5_AUTHDATA_SESAME	65
1011 
1012 /* password change constants */
1013 
1014 #define KRB5_KPASSWD_SUCCESS		0
1015 #define KRB5_KPASSWD_MALFORMED		1
1016 #define KRB5_KPASSWD_HARDERROR		2
1017 #define KRB5_KPASSWD_AUTHERROR		3
1018 #define KRB5_KPASSWD_SOFTERROR		4
1019 /* These are Microsoft's extensions in RFC 3244, and it looks like
1020    they'll become standardized, possibly with other additions.  */
1021 #define KRB5_KPASSWD_ACCESSDENIED	5	/* unused */
1022 #define KRB5_KPASSWD_BAD_VERSION	6
1023 #define KRB5_KPASSWD_INITIAL_FLAG_NEEDED 7	/* unused */
1024 
1025 /*
1026  * end "proto.h"
1027  */
1028 
1029 /* Time set */
1030 typedef struct _krb5_ticket_times {
1031     krb5_timestamp authtime; /* XXX ? should ktime in KDC_REP == authtime
1032 				in ticket? otherwise client can't get this */
1033     krb5_timestamp starttime;		/* optional in ticket, if not present,
1034 					   use authtime */
1035     krb5_timestamp endtime;
1036     krb5_timestamp renew_till;
1037 } krb5_ticket_times;
1038 
1039 /* structure for auth data */
1040 typedef struct _krb5_authdata {
1041     krb5_magic magic;
1042     krb5_authdatatype ad_type;
1043     unsigned int length;
1044     krb5_octet *contents;
1045 } krb5_authdata;
1046 
1047 /* structure for transited encoding */
1048 typedef struct _krb5_transited {
1049     krb5_magic magic;
1050     krb5_octet tr_type;
1051     krb5_data tr_contents;
1052 } krb5_transited;
1053 
1054 typedef struct _krb5_enc_tkt_part {
1055     krb5_magic magic;
1056     /* to-be-encrypted portion */
1057     krb5_flags flags;			/* flags */
1058     krb5_keyblock *session;		/* session key: includes enctype */
1059     krb5_principal client;		/* client name/realm */
1060     krb5_transited transited;		/* list of transited realms */
1061     krb5_ticket_times times;		/* auth, start, end, renew_till */
1062     krb5_address **caddrs;	/* array of ptrs to addresses */
1063     krb5_authdata **authorization_data; /* auth data */
1064 } krb5_enc_tkt_part;
1065 
1066 typedef struct _krb5_ticket {
1067     krb5_magic magic;
1068     /* cleartext portion */
1069     krb5_principal server;		/* server name/realm */
1070     krb5_enc_data enc_part;		/* encryption type, kvno, encrypted
1071 					   encoding */
1072     krb5_enc_tkt_part *enc_part2;	/* ptr to decrypted version, if
1073 					   available */
1074 } krb5_ticket;
1075 
1076 /* the unencrypted version */
1077 typedef struct _krb5_authenticator {
1078     krb5_magic magic;
1079     krb5_principal client;		/* client name/realm */
1080     krb5_checksum *checksum;	/* checksum, includes type, optional */
1081     krb5_int32 cusec;			/* client usec portion */
1082     krb5_timestamp ctime;		/* client sec portion */
1083     krb5_keyblock *subkey;		/* true session key, optional */
1084     krb5_ui_4 seq_number;		/* sequence #, optional */
1085     krb5_authdata **authorization_data; /* New add by Ari, auth data */
1086 } krb5_authenticator;
1087 
1088 typedef struct _krb5_tkt_authent {
1089     krb5_magic magic;
1090     krb5_ticket *ticket;
1091     krb5_authenticator *authenticator;
1092     krb5_flags ap_options;
1093 } krb5_tkt_authent;
1094 
1095 /* credentials:	 Ticket, session key, etc. */
1096 typedef struct _krb5_creds {
1097     krb5_magic magic;
1098     krb5_principal client;		/* client's principal identifier */
1099     krb5_principal server;		/* server's principal identifier */
1100     krb5_keyblock keyblock;		/* session encryption key info */
1101     krb5_ticket_times times;		/* lifetime info */
1102     krb5_boolean is_skey;		/* true if ticket is encrypted in
1103 					   another ticket's skey */
1104     krb5_flags ticket_flags;		/* flags in ticket */
1105     krb5_address * *addresses;	/* addrs in ticket */
1106     krb5_data ticket;			/* ticket string itself */
1107     krb5_data second_ticket;		/* second ticket, if related to
1108 					   ticket (via DUPLICATE-SKEY or
1109 					   ENC-TKT-IN-SKEY) */
1110     krb5_authdata **authdata;	/* authorization data */
1111 } krb5_creds;
1112 
1113 /* Last request fields */
1114 typedef struct _krb5_last_req_entry {
1115     krb5_magic magic;
1116     krb5_int32 lr_type;
1117     krb5_timestamp value;
1118 } krb5_last_req_entry;
1119 
1120 /* pre-authentication data */
1121 typedef struct _krb5_pa_data {
1122     krb5_magic magic;
1123     krb5_preauthtype  pa_type;
1124     unsigned int length;
1125     krb5_octet *contents;
1126 } krb5_pa_data;
1127 
1128 typedef struct _krb5_kdc_req {
1129     krb5_magic magic;
1130     krb5_msgtype msg_type;		/* AS_REQ or TGS_REQ? */
1131     krb5_pa_data **padata;	/* e.g. encoded AP_REQ */
1132     /* real body */
1133     krb5_flags kdc_options;		/* requested options */
1134     krb5_principal client;		/* includes realm; optional */
1135     krb5_principal server;		/* includes realm (only used if no
1136 					   client) */
1137     krb5_timestamp from;		/* requested starttime */
1138     krb5_timestamp till;		/* requested endtime */
1139     krb5_timestamp rtime;		/* (optional) requested renew_till */
1140     krb5_int32 nonce;			/* nonce to match request/response */
1141     int nktypes;			/* # of ktypes, must be positive */
1142     krb5_enctype *ktype;		/* requested enctype(s) */
1143     krb5_address **addresses;	/* requested addresses, optional */
1144     krb5_enc_data authorization_data;	/* encrypted auth data; OPTIONAL */
1145     krb5_authdata **unenc_authdata; /* unencrypted auth data,
1146 					   if available */
1147     krb5_ticket **second_ticket;/* second ticket array; OPTIONAL */
1148 } krb5_kdc_req;
1149 
1150 typedef struct _krb5_enc_kdc_rep_part {
1151     krb5_magic magic;
1152     /* encrypted part: */
1153     krb5_msgtype msg_type;		/* krb5 message type */
1154     krb5_keyblock *session;		/* session key */
1155     krb5_last_req_entry **last_req; /* array of ptrs to entries */
1156     krb5_int32 nonce;			/* nonce from request */
1157     krb5_timestamp key_exp;		/* expiration date */
1158     krb5_flags flags;			/* ticket flags */
1159     krb5_ticket_times times;		/* lifetime info */
1160     krb5_principal server;		/* server's principal identifier */
1161     krb5_address **caddrs;	/* array of ptrs to addresses,
1162 					   optional */
1163 } krb5_enc_kdc_rep_part;
1164 
1165 typedef struct _krb5_kdc_rep {
1166     krb5_magic magic;
1167     /* cleartext part: */
1168     krb5_msgtype msg_type;		/* AS_REP or KDC_REP? */
1169     krb5_pa_data **padata;	/* preauthentication data from KDC */
1170     krb5_principal client;		/* client's principal identifier */
1171     krb5_ticket *ticket;		/* ticket */
1172     krb5_enc_data enc_part;		/* encryption type, kvno, encrypted
1173 					   encoding */
1174     krb5_enc_kdc_rep_part *enc_part2;/* unencrypted version, if available */
1175 } krb5_kdc_rep;
1176 
1177 /* error message structure */
1178 typedef struct _krb5_error {
1179     krb5_magic magic;
1180     /* some of these may be meaningless in certain contexts */
1181     krb5_timestamp ctime;		/* client sec portion; optional */
1182     krb5_int32 cusec;			/* client usec portion; optional */
1183     krb5_int32 susec;			/* server usec portion */
1184     krb5_timestamp stime;		/* server sec portion */
1185     krb5_ui_4 error;			/* error code (protocol error #'s) */
1186     krb5_principal client;		/* client's principal identifier;
1187 					   optional */
1188     krb5_principal server;		/* server's principal identifier */
1189     krb5_data text;			/* descriptive text */
1190     krb5_data e_data;			/* additional error-describing data */
1191 } krb5_error;
1192 
1193 typedef struct _krb5_ap_req {
1194     krb5_magic magic;
1195     krb5_flags ap_options;		/* requested options */
1196     krb5_ticket *ticket;		/* ticket */
1197     krb5_enc_data authenticator;	/* authenticator (already encrypted) */
1198 } krb5_ap_req;
1199 
1200 typedef struct _krb5_ap_rep {
1201     krb5_magic magic;
1202     krb5_enc_data enc_part;
1203 } krb5_ap_rep;
1204 
1205 typedef struct _krb5_ap_rep_enc_part {
1206     krb5_magic magic;
1207     krb5_timestamp ctime;		/* client time, seconds portion */
1208     krb5_int32 cusec;			/* client time, microseconds portion */
1209     krb5_keyblock *subkey;		/* true session key, optional */
1210     krb5_ui_4 seq_number;		/* sequence #, optional */
1211 } krb5_ap_rep_enc_part;
1212 
1213 typedef struct _krb5_response {
1214     krb5_magic magic;
1215     krb5_octet message_type;
1216     krb5_data response;
1217     krb5_int32 expected_nonce;	/* The expected nonce for KDC_REP messages */
1218     krb5_timestamp request_time;   /* When we made the request */
1219 } krb5_response;
1220 
1221 typedef struct _krb5_cred_info {
1222     krb5_magic magic;
1223     krb5_keyblock *session;		/* session key used to encrypt */
1224 					/* ticket */
1225     krb5_principal client;		/* client name/realm, optional */
1226     krb5_principal server;		/* server name/realm, optional */
1227     krb5_flags flags;			/* ticket flags, optional */
1228     krb5_ticket_times times;		/* auth, start, end, renew_till, */
1229 					/* optional */
1230     krb5_address **caddrs;	/* array of ptrs to addresses */
1231 } krb5_cred_info;
1232 
1233 typedef struct _krb5_cred_enc_part {
1234     krb5_magic magic;
1235     krb5_int32 nonce;			/* nonce, optional */
1236     krb5_timestamp timestamp;		/* client time */
1237     krb5_int32 usec;			/* microsecond portion of time */
1238     krb5_address *s_address;	/* sender address, optional */
1239     krb5_address *r_address;	/* recipient address, optional */
1240     krb5_cred_info **ticket_info;
1241 } krb5_cred_enc_part;
1242 
1243 typedef struct _krb5_cred {
1244     krb5_magic magic;
1245     krb5_ticket **tickets;	/* tickets */
1246     krb5_enc_data enc_part;		/* encrypted part */
1247     krb5_cred_enc_part *enc_part2;	/* unencrypted version, if available*/
1248 } krb5_cred;
1249 
1250 /* Sandia password generation structures */
1251 typedef struct _passwd_phrase_element {
1252     krb5_magic magic;
1253     krb5_data *passwd;
1254     krb5_data *phrase;
1255 } passwd_phrase_element;
1256 
1257 typedef struct _krb5_pwd_data {
1258     krb5_magic magic;
1259     int sequence_count;
1260     passwd_phrase_element **element;
1261 } krb5_pwd_data;
1262 
1263 /* these need to be here so the typedefs are available for the prototypes */
1264 
1265 /*
1266  * begin "safepriv.h"
1267  */
1268 
1269 #define KRB5_AUTH_CONTEXT_DO_TIME	0x00000001
1270 #define KRB5_AUTH_CONTEXT_RET_TIME	0x00000002
1271 #define KRB5_AUTH_CONTEXT_DO_SEQUENCE	0x00000004
1272 #define KRB5_AUTH_CONTEXT_RET_SEQUENCE	0x00000008
1273 #define KRB5_AUTH_CONTEXT_PERMIT_ALL	0x00000010
1274 #define KRB5_AUTH_CONTEXT_USE_SUBKEY	0x00000020
1275 
1276 typedef struct krb5_replay_data {
1277     krb5_timestamp	timestamp;
1278     krb5_int32		usec;
1279     krb5_int32		seq;
1280 } krb5_replay_data;
1281 
1282 /* flags for krb5_auth_con_genaddrs() */
1283 #define KRB5_AUTH_CONTEXT_GENERATE_LOCAL_ADDR		0x00000001
1284 #define KRB5_AUTH_CONTEXT_GENERATE_REMOTE_ADDR		0x00000002
1285 #define KRB5_AUTH_CONTEXT_GENERATE_LOCAL_FULL_ADDR	0x00000004
1286 #define KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR	0x00000008
1287 
1288 /* type of function used as a callback to generate checksum data for
1289  * mk_req */
1290 
1291 typedef krb5_error_code
1292 (KRB5_CALLCONV * krb5_mk_req_checksum_func) (krb5_context, krb5_auth_context , void *,
1293 			       krb5_data **);
1294 
1295 /*
1296  * end "safepriv.h"
1297  */
1298 
1299 
1300 /*
1301  * begin "ccache.h"
1302  */
1303 
1304 typedef	krb5_pointer	krb5_cc_cursor;	/* cursor for sequential lookup */
1305 
1306 struct _krb5_ccache;
1307 typedef struct _krb5_ccache *krb5_ccache;
1308 struct _krb5_cc_ops;
1309 typedef struct _krb5_cc_ops krb5_cc_ops;
1310 
1311 /* for retrieve_cred */
1312 #define	KRB5_TC_MATCH_TIMES		0x00000001
1313 #define	KRB5_TC_MATCH_IS_SKEY		0x00000002
1314 #define	KRB5_TC_MATCH_FLAGS		0x00000004
1315 #define	KRB5_TC_MATCH_TIMES_EXACT	0x00000008
1316 #define	KRB5_TC_MATCH_FLAGS_EXACT	0x00000010
1317 #define	KRB5_TC_MATCH_AUTHDATA		0x00000020
1318 #define	KRB5_TC_MATCH_SRV_NAMEONLY	0x00000040
1319 #define	KRB5_TC_MATCH_2ND_TKT		0x00000080
1320 #define	KRB5_TC_MATCH_KTYPE		0x00000100
1321 #define KRB5_TC_SUPPORTED_KTYPES	0x00000200
1322 
1323 /* for set_flags and other functions */
1324 #define KRB5_TC_OPENCLOSE		0x00000001
1325 #define KRB5_TC_NOTICKET                0x00000002
1326 
1327 
1328 krb5_error_code KRB5_CALLCONV
1329 krb5_cc_gen_new (krb5_context context, krb5_ccache *cache);
1330 
1331 krb5_error_code KRB5_CALLCONV
1332 krb5_cc_initialize(krb5_context context, krb5_ccache cache,
1333 		   krb5_principal principal);
1334 
1335 krb5_error_code KRB5_CALLCONV
1336 krb5_cc_destroy (krb5_context context, krb5_ccache cache);
1337 
1338 krb5_error_code KRB5_CALLCONV
1339 krb5_cc_close (krb5_context context, krb5_ccache cache);
1340 
1341 krb5_error_code KRB5_CALLCONV
1342 krb5_cc_store_cred (krb5_context context, krb5_ccache cache,
1343                     krb5_creds *creds);
1344 
1345 krb5_error_code KRB5_CALLCONV
1346 krb5_cc_retrieve_cred (krb5_context context, krb5_ccache cache,
1347 		       krb5_flags flags, krb5_creds *mcreds,
1348 		       krb5_creds *creds);
1349 
1350 krb5_error_code KRB5_CALLCONV
1351 krb5_cc_get_principal (krb5_context context, krb5_ccache cache,
1352 		       krb5_principal *principal);
1353 
1354 krb5_error_code KRB5_CALLCONV
1355 krb5_cc_start_seq_get (krb5_context context, krb5_ccache cache,
1356 		       krb5_cc_cursor *cursor);
1357 
1358 krb5_error_code KRB5_CALLCONV
1359 krb5_cc_next_cred (krb5_context context, krb5_ccache cache,
1360 		   krb5_cc_cursor *cursor, krb5_creds *creds);
1361 
1362 krb5_error_code KRB5_CALLCONV
1363 krb5_cc_end_seq_get (krb5_context context, krb5_ccache cache,
1364 		     krb5_cc_cursor *cursor);
1365 
1366 krb5_error_code KRB5_CALLCONV
1367 krb5_cc_remove_cred (krb5_context context, krb5_ccache cache, krb5_flags flags,
1368 		     krb5_creds *creds);
1369 
1370 krb5_error_code KRB5_CALLCONV
1371 krb5_cc_set_flags (krb5_context context, krb5_ccache cache, krb5_flags flags);
1372 
1373 krb5_error_code KRB5_CALLCONV
1374 krb5_cc_get_flags (krb5_context context, krb5_ccache cache, krb5_flags *flags);
1375 
1376 const char * KRB5_CALLCONV
1377 krb5_cc_get_type (krb5_context context, krb5_ccache cache);
1378 
1379 /* SUNW14resync - add_cred.c needs this func */
1380 const char * KRB5_CALLCONV
1381 krb5_cc_get_name (krb5_context context, krb5_ccache cache);
1382 
1383 krb5_error_code KRB5_CALLCONV
1384 krb5_cc_new_unique(
1385     krb5_context context,
1386     const char *type,
1387     const char *hint,
1388     krb5_ccache *id);
1389 
1390 /*
1391  * end "ccache.h"
1392  */
1393 
1394 /*
1395  * begin "rcache.h"
1396  */
1397 
1398 struct krb5_rc_st;
1399 typedef struct krb5_rc_st *krb5_rcache;
1400 
1401 /*
1402  * end "rcache.h"
1403  */
1404 
1405 /*
1406  * begin "keytab.h"
1407  */
1408 
1409 
1410 /* XXX */
1411 #define MAX_KEYTAB_NAME_LEN 1100 /* Long enough for MAXPATHLEN + some extra */
1412 
1413 typedef krb5_pointer krb5_kt_cursor;	/* XXX */
1414 
1415 typedef struct krb5_keytab_entry_st {
1416     krb5_magic magic;
1417     krb5_principal principal;	/* principal of this key */
1418     krb5_timestamp timestamp;	/* time entry written to keytable */
1419     krb5_kvno vno;		/* key version number */
1420     krb5_keyblock key;		/* the secret key */
1421 } krb5_keytab_entry;
1422 
1423 #if KRB5_PRIVATE
1424 struct _krb5_kt_ops;
1425 typedef struct _krb5_kt {	/* should move into k5-int.h */
1426     krb5_magic magic;
1427     const struct _krb5_kt_ops *ops;
1428     krb5_pointer data;
1429 } *krb5_keytab;
1430 #else
1431 struct _krb5_kt;
1432 typedef struct _krb5_kt *krb5_keytab;
1433 #endif
1434 
1435 char * KRB5_CALLCONV
1436 krb5_kt_get_type (krb5_context, krb5_keytab keytab);
1437 krb5_error_code KRB5_CALLCONV
1438 krb5_kt_get_name(krb5_context context, krb5_keytab keytab, char *name,
1439 		 unsigned int namelen);
1440 krb5_error_code KRB5_CALLCONV
1441 krb5_kt_close(krb5_context context, krb5_keytab keytab);
1442 krb5_error_code KRB5_CALLCONV
1443 krb5_kt_get_entry(krb5_context context, krb5_keytab keytab,
1444 		  krb5_const_principal principal, krb5_kvno vno,
1445 		  krb5_enctype enctype, krb5_keytab_entry *entry);
1446 krb5_error_code KRB5_CALLCONV
1447 krb5_kt_start_seq_get(krb5_context context, krb5_keytab keytab,
1448 		      krb5_kt_cursor *cursor);
1449 krb5_error_code KRB5_CALLCONV
1450 krb5_kt_next_entry(krb5_context context, krb5_keytab keytab,
1451 		   krb5_keytab_entry *entry, krb5_kt_cursor *cursor);
1452 krb5_error_code KRB5_CALLCONV
1453 krb5_kt_end_seq_get(krb5_context context, krb5_keytab keytab,
1454 		    krb5_kt_cursor *cursor);
1455 /* Solaris Kerberos */
1456 krb5_error_code
1457 krb5_kt_find_realm(krb5_context context, krb5_keytab keytab,
1458 		  krb5_principal princ, krb5_data *realm);
1459 
1460 /*
1461  * end "keytab.h"
1462  */
1463 
1464 /*
1465  * begin "func-proto.h"
1466  */
1467 
1468 /* Solaris Kerberos */
1469 krb5_error_code krb5_init_ef_handle(krb5_context);
1470 krb5_error_code krb5_free_ef_handle(krb5_context);
1471 
1472 krb5_boolean krb5_privacy_allowed(void);
1473 
1474 /*
1475  * Solaris Kerberos:
1476  * krb5_copy_keyblock_data is a new routine to hide the details
1477  * of a keyblock copy operation.
1478  */
1479 krb5_error_code KRB5_CALLCONV krb5_copy_keyblock_data
1480 	(krb5_context,
1481 		const krb5_keyblock *,
1482 		krb5_keyblock *);
1483 
1484 
1485 
1486 krb5_error_code KRB5_CALLCONV krb5_init_context
1487 	(krb5_context *);
1488 krb5_error_code KRB5_CALLCONV krb5_init_secure_context
1489 	(krb5_context *);
1490 void KRB5_CALLCONV krb5_free_context
1491 	(krb5_context);
1492 
1493 #if KRB5_PRIVATE
1494 krb5_error_code krb5_set_default_in_tkt_ktypes
1495 	(krb5_context,
1496 		const krb5_enctype *);
1497 krb5_error_code krb5_get_default_in_tkt_ktypes
1498 	(krb5_context,
1499 		krb5_enctype **);
1500 
1501 krb5_error_code krb5_set_default_tgs_ktypes
1502 	(krb5_context,
1503 		const krb5_enctype *);
1504 #endif
1505 
1506 krb5_error_code KRB5_CALLCONV
1507 krb5_set_default_tgs_enctypes
1508 	(krb5_context,
1509 		const krb5_enctype *);
1510 #if KRB5_PRIVATE
1511 krb5_error_code KRB5_CALLCONV krb5_get_tgs_ktypes
1512 	(krb5_context,
1513 		krb5_const_principal,
1514 		krb5_enctype **);
1515 #endif
1516 
1517 krb5_error_code KRB5_CALLCONV krb5_get_permitted_enctypes
1518 	(krb5_context, krb5_enctype **);
1519 
1520 #if KRB5_PRIVATE
1521 void KRB5_CALLCONV krb5_free_ktypes
1522 	(krb5_context, krb5_enctype *);
1523 
1524 krb5_boolean krb5_is_permitted_enctype
1525 	(krb5_context, krb5_enctype);
1526 #endif
1527 
1528 krb5_boolean KRB5_CALLCONV krb5_is_thread_safe(void);
1529 
1530 /* libkrb.spec */
1531 #if KRB5_PRIVATE
1532 krb5_error_code krb5_kdc_rep_decrypt_proc
1533 	(krb5_context,
1534 		const krb5_keyblock *,
1535 		krb5_const_pointer,
1536 		krb5_kdc_rep * );
1537 krb5_error_code KRB5_CALLCONV krb5_decrypt_tkt_part
1538 	(krb5_context,
1539 		const krb5_keyblock *,
1540 		krb5_ticket * );
1541 krb5_error_code krb5_get_cred_from_kdc
1542 	(krb5_context,
1543 		krb5_ccache,		/* not const, as reading may save
1544 					   state */
1545 		krb5_creds *,
1546 		krb5_creds **,
1547 		krb5_creds *** );
1548 krb5_error_code krb5_get_cred_from_kdc_validate
1549 	(krb5_context,
1550 		krb5_ccache,		/* not const, as reading may save
1551 					   state */
1552 		krb5_creds *,
1553 		krb5_creds **,
1554 		krb5_creds *** );
1555 krb5_error_code krb5_get_cred_from_kdc_renew
1556 	(krb5_context,
1557 		krb5_ccache,		/* not const, as reading may save
1558 					   state */
1559 		krb5_creds *,
1560 		krb5_creds **,
1561 		krb5_creds *** );
1562 #endif
1563 
1564 void KRB5_CALLCONV krb5_free_tgt_creds
1565 	(krb5_context,
1566 	 krb5_creds **); /* XXX too hard to do with const */
1567 
1568 #define	KRB5_GC_USER_USER	1	/* want user-user ticket */
1569 #define	KRB5_GC_CACHED		2	/* want cached ticket only */
1570 
1571 krb5_error_code KRB5_CALLCONV krb5_get_credentials
1572 	(krb5_context,
1573 		krb5_flags,
1574 		krb5_ccache,
1575 		krb5_creds *,
1576 		krb5_creds **);
1577 krb5_error_code KRB5_CALLCONV krb5_get_credentials_validate
1578 	(krb5_context,
1579 		krb5_flags,
1580 		krb5_ccache,
1581 		krb5_creds *,
1582 		krb5_creds **);
1583 krb5_error_code KRB5_CALLCONV krb5_get_credentials_renew
1584 	(krb5_context,
1585 		krb5_flags,
1586 		krb5_ccache,
1587 		krb5_creds *,
1588 		krb5_creds **);
1589 #if KRB5_PRIVATE
1590 krb5_error_code krb5_get_cred_via_tkt
1591 	(krb5_context,
1592 		   krb5_creds *,
1593 		   krb5_flags,
1594 		   krb5_address * const *,
1595 		   krb5_creds *,
1596 		   krb5_creds **);
1597 #endif
1598 krb5_error_code KRB5_CALLCONV krb5_mk_req
1599 	(krb5_context,
1600 		krb5_auth_context *,
1601 		krb5_flags,
1602 		char *,
1603 		char *,
1604 		krb5_data *,
1605 		krb5_ccache,
1606 		krb5_data * );
1607 krb5_error_code KRB5_CALLCONV krb5_mk_req_extended
1608 	(krb5_context,
1609 		krb5_auth_context *,
1610 		krb5_flags,
1611 		krb5_data *,
1612 		krb5_creds *,
1613 		krb5_data * );
1614 krb5_error_code KRB5_CALLCONV krb5_mk_rep
1615 	(krb5_context,
1616 		krb5_auth_context,
1617 		krb5_data *);
1618 krb5_error_code KRB5_CALLCONV krb5_rd_rep
1619 	(krb5_context,
1620 		krb5_auth_context,
1621 		const krb5_data *,
1622 		krb5_ap_rep_enc_part **);
1623 krb5_error_code KRB5_CALLCONV krb5_mk_error
1624 	(krb5_context,
1625 		const krb5_error *,
1626 		krb5_data * );
1627 krb5_error_code KRB5_CALLCONV krb5_rd_error
1628 	(krb5_context,
1629 		const krb5_data *,
1630 		krb5_error ** );
1631 krb5_error_code KRB5_CALLCONV krb5_rd_safe
1632 	(krb5_context,
1633 		krb5_auth_context,
1634 		const krb5_data *,
1635 		krb5_data *,
1636 		krb5_replay_data *);
1637 krb5_error_code KRB5_CALLCONV krb5_rd_priv
1638 	(krb5_context,
1639 		krb5_auth_context,
1640 		const krb5_data *,
1641 		krb5_data *,
1642 		krb5_replay_data *);
1643 krb5_error_code KRB5_CALLCONV krb5_parse_name
1644 	(krb5_context,
1645 		const char *,
1646 		krb5_principal * );
1647 krb5_error_code KRB5_CALLCONV krb5_unparse_name
1648 	(krb5_context,
1649 		krb5_const_principal,
1650 		char ** );
1651 krb5_error_code KRB5_CALLCONV krb5_unparse_name_ext
1652 	(krb5_context,
1653 		krb5_const_principal,
1654 		char **,
1655 		unsigned int *);
1656 
1657 krb5_error_code KRB5_CALLCONV krb5_set_principal_realm
1658 	(krb5_context, krb5_principal, const char *);
1659 
1660 krb5_boolean KRB5_CALLCONV_WRONG krb5_address_search
1661 	(krb5_context,
1662 		const krb5_address *,
1663 		krb5_address * const *);
1664 krb5_boolean KRB5_CALLCONV krb5_address_compare
1665 	(krb5_context,
1666 		const krb5_address *,
1667 		const krb5_address *);
1668 int KRB5_CALLCONV krb5_address_order
1669 	(krb5_context,
1670 		const krb5_address *,
1671 		const krb5_address *);
1672 krb5_boolean KRB5_CALLCONV krb5_realm_compare
1673 	(krb5_context,
1674 		krb5_const_principal,
1675 		krb5_const_principal);
1676 krb5_boolean KRB5_CALLCONV krb5_principal_compare
1677 	(krb5_context,
1678 		krb5_const_principal,
1679 		krb5_const_principal);
1680 krb5_error_code KRB5_CALLCONV  krb5_init_keyblock
1681 		(krb5_context, krb5_enctype enctype,
1682 		size_t length, krb5_keyblock **out);
1683   		/* Initialize a new keyblock and allocate storage
1684 		 * for the contents of the key, which will be freed along
1685 		 * with the keyblock when krb5_free_keyblock is called.
1686 		 * It is legal to pass in a length of 0, in which
1687 		 * case contents are left unallocated.
1688 		 */
1689 
1690 /*
1691  * Solaris Kerberos
1692  * Start - keyblock API (MIT will ship this also in a future release)
1693  */
1694 /*
1695  * Similiar to krb5_init_keyblock but this routine expects the
1696  * keyblock to already be allocated.
1697  */
1698 krb5_error_code KRB5_CALLCONV krb5_init_allocated_keyblock
1699         (krb5_context,
1700 	        krb5_enctype,
1701 	        unsigned int,
1702                 krb5_keyblock *);
1703 
1704 krb5_enctype KRB5_CALLCONV krb5_get_key_enctype
1705         (krb5_keyblock *);
1706 
1707 unsigned int KRB5_CALLCONV krb5_get_key_length
1708         (krb5_keyblock *);
1709 
1710 krb5_octet KRB5_CALLCONV *krb5_get_key_data
1711         (krb5_keyblock *);
1712 
1713 void KRB5_CALLCONV krb5_set_key_enctype
1714         (krb5_keyblock *,
1715                  krb5_enctype);
1716 
1717 void KRB5_CALLCONV krb5_set_key_data
1718         (krb5_keyblock *,
1719                  krb5_octet *);
1720 
1721 void KRB5_CALLCONV krb5_set_key_length
1722         (krb5_keyblock *,
1723                  unsigned int);
1724 /*
1725  * Solaris Kerberos
1726  * End - keyblock API
1727  */
1728 
1729 krb5_error_code KRB5_CALLCONV krb5_copy_keyblock
1730 	(krb5_context,
1731 		const krb5_keyblock *,
1732 		krb5_keyblock **);
1733 krb5_error_code KRB5_CALLCONV krb5_copy_keyblock_contents
1734 	(krb5_context,
1735 		const krb5_keyblock *,
1736 		krb5_keyblock *);
1737 krb5_error_code KRB5_CALLCONV krb5_copy_creds
1738 	(krb5_context,
1739 		const krb5_creds *,
1740 		krb5_creds **);
1741 krb5_error_code KRB5_CALLCONV krb5_copy_data
1742 	(krb5_context,
1743 		const krb5_data *,
1744 		krb5_data **);
1745 krb5_error_code KRB5_CALLCONV krb5_copy_principal
1746 	(krb5_context,
1747 		krb5_const_principal,
1748 		krb5_principal *);
1749 #if KRB5_PRIVATE
1750 krb5_error_code KRB5_CALLCONV krb5_copy_addr
1751 	(krb5_context,
1752 		const krb5_address *,
1753 		krb5_address **);
1754 #endif
1755 krb5_error_code KRB5_CALLCONV krb5_copy_addresses
1756 	(krb5_context,
1757 		krb5_address * const *,
1758 		krb5_address ***);
1759 krb5_error_code KRB5_CALLCONV krb5_copy_ticket
1760 	(krb5_context,
1761 		const krb5_ticket *,
1762 		krb5_ticket **);
1763 krb5_error_code KRB5_CALLCONV krb5_copy_authdata
1764 	(krb5_context,
1765 		krb5_authdata * const *,
1766 		krb5_authdata ***);
1767 krb5_error_code KRB5_CALLCONV krb5_copy_authenticator
1768 	(krb5_context,
1769 		const krb5_authenticator *,
1770 		krb5_authenticator **);
1771 krb5_error_code KRB5_CALLCONV krb5_copy_checksum
1772 	(krb5_context,
1773 		const krb5_checksum *,
1774 		krb5_checksum **);
1775 #if KRB5_PRIVATE
1776 void krb5_init_ets
1777 	(krb5_context);
1778 void krb5_free_ets
1779 	(krb5_context);
1780 krb5_error_code krb5_generate_subkey
1781 	(krb5_context,
1782 		const krb5_keyblock *, krb5_keyblock **);
1783 krb5_error_code krb5_generate_seq_number
1784 	(krb5_context,
1785 		const krb5_keyblock *, krb5_ui_4 *);
1786 #endif
1787 krb5_error_code KRB5_CALLCONV krb5_get_server_rcache
1788 	(krb5_context,
1789 		const krb5_data *, krb5_rcache *);
1790 krb5_error_code KRB5_CALLCONV_C krb5_build_principal_ext
1791 	(krb5_context, krb5_principal *, unsigned int, const char *, ...);
1792 krb5_error_code KRB5_CALLCONV_C krb5_build_principal
1793 	(krb5_context, krb5_principal *, unsigned int, const char *, ...);
1794 #ifdef va_start
1795 /* XXX depending on varargs include file defining va_start... */
1796 krb5_error_code KRB5_CALLCONV krb5_build_principal_va
1797 	(krb5_context,
1798 		krb5_principal, unsigned int, const char *, va_list);
1799 #endif
1800 
1801 krb5_error_code KRB5_CALLCONV krb5_425_conv_principal
1802 	(krb5_context,
1803 		const char *name,
1804 		const char *instance, const char *realm,
1805 		krb5_principal *princ);
1806 
1807 krb5_error_code KRB5_CALLCONV krb5_524_conv_principal
1808 	(krb5_context context, krb5_const_principal princ,
1809 		char *name, char *inst, char *realm);
1810 
1811 struct credentials;
1812 int KRB5_CALLCONV krb5_524_convert_creds
1813 	(krb5_context context, krb5_creds *v5creds,
1814 	 struct credentials *v4creds);
1815 #if KRB5_DEPRECATED
1816 #define krb524_convert_creds_kdc krb5_524_convert_creds
1817 #define krb524_init_ets(x) (0)
1818 #endif
1819 
1820 /* libkt.spec */
1821 #if KRB5_PRIVATE
1822 krb5_error_code KRB5_CALLCONV krb5_kt_register
1823 	(krb5_context,
1824 		const struct _krb5_kt_ops * );
1825 #endif
1826 
1827 krb5_error_code KRB5_CALLCONV krb5_kt_resolve
1828 	(krb5_context,
1829 		const char *,
1830 		krb5_keytab * );
1831 krb5_error_code KRB5_CALLCONV krb5_kt_default_name
1832 	(krb5_context,
1833 		char *,
1834 		int );
1835 krb5_error_code KRB5_CALLCONV krb5_kt_default
1836 	(krb5_context,
1837 		krb5_keytab * );
1838 krb5_error_code KRB5_CALLCONV krb5_free_keytab_entry_contents
1839 	(krb5_context,
1840 		krb5_keytab_entry * );
1841 #if KRB5_PRIVATE
1842 /* use krb5_free_keytab_entry_contents instead */
1843 krb5_error_code KRB5_CALLCONV krb5_kt_free_entry
1844 	(krb5_context,
1845 		krb5_keytab_entry * );
1846 #endif
1847 /* remove and add are functions, so that they can return NOWRITE
1848    if not a writable keytab */
1849 krb5_error_code KRB5_CALLCONV krb5_kt_remove_entry
1850 	(krb5_context,
1851 		krb5_keytab,
1852 		krb5_keytab_entry * );
1853 krb5_error_code KRB5_CALLCONV krb5_kt_add_entry
1854 	(krb5_context,
1855 		krb5_keytab,
1856 		krb5_keytab_entry * );
1857 krb5_error_code KRB5_CALLCONV_WRONG krb5_principal2salt
1858 	(krb5_context,
1859 		krb5_const_principal, krb5_data *);
1860 #if KRB5_PRIVATE
1861 krb5_error_code krb5_principal2salt_norealm
1862 	(krb5_context,
1863 		krb5_const_principal, krb5_data *);
1864 #endif
1865 /* librc.spec--see rcache.h */
1866 
1867 /* libcc.spec */
1868 krb5_error_code KRB5_CALLCONV krb5_cc_resolve
1869 	(krb5_context,
1870 		const char *,
1871 		krb5_ccache * );
1872 const char * KRB5_CALLCONV krb5_cc_default_name
1873 	(krb5_context);
1874 krb5_error_code KRB5_CALLCONV krb5_cc_set_default_name
1875 	(krb5_context, const char *);
1876 krb5_error_code KRB5_CALLCONV krb5_cc_default
1877 	(krb5_context,
1878 		krb5_ccache *);
1879 #if KRB5_PRIVATE
1880 unsigned int KRB5_CALLCONV krb5_get_notification_message
1881 	(void);
1882 #endif
1883 
1884 krb5_error_code KRB5_CALLCONV krb5_cc_copy_creds
1885 	(krb5_context context,
1886 			krb5_ccache incc,
1887 			krb5_ccache outcc);
1888 
1889 
1890 /* chk_trans.c */
1891 #if KRB5_PRIVATE
1892 krb5_error_code krb5_check_transited_list
1893 	(krb5_context, const krb5_data *trans,
1894 	 const krb5_data *realm1, const krb5_data *realm2);
1895 #endif
1896 
1897 /* free_rtree.c */
1898 #if KRB5_PRIVATE
1899 void krb5_free_realm_tree
1900 	(krb5_context,
1901 		krb5_principal *);
1902 #endif
1903 
1904 /* krb5_free.c */
1905 void KRB5_CALLCONV krb5_free_principal
1906 	(krb5_context, krb5_principal );
1907 void KRB5_CALLCONV krb5_free_authenticator
1908 	(krb5_context, krb5_authenticator * );
1909 #if KRB5_PRIVATE
1910 void KRB5_CALLCONV krb5_free_authenticator_contents
1911 	(krb5_context, krb5_authenticator * );
1912 #endif
1913 void KRB5_CALLCONV krb5_free_addresses
1914 	(krb5_context, krb5_address ** );
1915 #if KRB5_PRIVATE
1916 void KRB5_CALLCONV krb5_free_address
1917 	(krb5_context, krb5_address * );
1918 #endif
1919 void KRB5_CALLCONV krb5_free_authdata
1920 	(krb5_context, krb5_authdata ** );
1921 #if KRB5_PRIVATE
1922 void KRB5_CALLCONV krb5_free_enc_tkt_part
1923 	(krb5_context, krb5_enc_tkt_part * );
1924 #endif
1925 void KRB5_CALLCONV krb5_free_ticket
1926 	(krb5_context, krb5_ticket * );
1927 #if KRB5_PRIVATE
1928 void KRB5_CALLCONV krb5_free_tickets
1929 	(krb5_context, krb5_ticket ** );
1930 void KRB5_CALLCONV krb5_free_kdc_req
1931 	(krb5_context, krb5_kdc_req * );
1932 void KRB5_CALLCONV krb5_free_kdc_rep
1933 	(krb5_context, krb5_kdc_rep * );
1934 void KRB5_CALLCONV krb5_free_last_req
1935 	(krb5_context, krb5_last_req_entry ** );
1936 void KRB5_CALLCONV krb5_free_enc_kdc_rep_part
1937 	(krb5_context, krb5_enc_kdc_rep_part * );
1938 #endif
1939 void KRB5_CALLCONV krb5_free_error
1940 	(krb5_context, krb5_error * );
1941 #if KRB5_PRIVATE
1942 void KRB5_CALLCONV krb5_free_ap_req
1943 	(krb5_context, krb5_ap_req * );
1944 void KRB5_CALLCONV krb5_free_ap_rep
1945 	(krb5_context, krb5_ap_rep * );
1946 void KRB5_CALLCONV krb5_free_cred
1947 	(krb5_context, krb5_cred *);
1948 #endif
1949 void KRB5_CALLCONV krb5_free_creds
1950 	(krb5_context, krb5_creds *);
1951 void KRB5_CALLCONV krb5_free_cred_contents
1952 	(krb5_context, krb5_creds *);
1953 #if KRB5_PRIVATE
1954 void KRB5_CALLCONV krb5_free_cred_enc_part
1955 	(krb5_context, krb5_cred_enc_part *);
1956 #endif
1957 void KRB5_CALLCONV krb5_free_checksum
1958 	(krb5_context, krb5_checksum *);
1959 void KRB5_CALLCONV krb5_free_checksum_contents
1960 	(krb5_context, krb5_checksum *);
1961 void KRB5_CALLCONV krb5_free_keyblock
1962 	(krb5_context, krb5_keyblock *);
1963 void KRB5_CALLCONV krb5_free_keyblock_contents
1964 	(krb5_context, krb5_keyblock *);
1965 #if KRB5_PRIVATE
1966 void KRB5_CALLCONV krb5_free_pa_data
1967 	(krb5_context, krb5_pa_data **);
1968 #endif
1969 void KRB5_CALLCONV krb5_free_ap_rep_enc_part
1970 	(krb5_context, krb5_ap_rep_enc_part *);
1971 #if KRB5_PRIVATE
1972 void KRB5_CALLCONV krb5_free_tkt_authent
1973 	(krb5_context, krb5_tkt_authent *);
1974 void KRB5_CALLCONV krb5_free_pwd_data
1975 	(krb5_context, krb5_pwd_data *);
1976 void KRB5_CALLCONV krb5_free_pwd_sequences
1977 	(krb5_context, passwd_phrase_element **);
1978 #endif
1979 void KRB5_CALLCONV krb5_free_data
1980 	(krb5_context, krb5_data *);
1981 void KRB5_CALLCONV krb5_free_data_contents
1982 	(krb5_context, krb5_data *);
1983 void KRB5_CALLCONV krb5_free_unparsed_name
1984 	(krb5_context, char *);
1985 void KRB5_CALLCONV krb5_free_cksumtypes
1986 	(krb5_context, krb5_cksumtype *);
1987 
1988 /* From krb5/os but needed but by the outside world */
1989 krb5_error_code KRB5_CALLCONV krb5_us_timeofday
1990 	(krb5_context,
1991 		krb5_int32 *,
1992 		krb5_int32 * );
1993 krb5_error_code KRB5_CALLCONV krb5_timeofday
1994 	(krb5_context,
1995 		krb5_int32 * );
1996 		 /* get all the addresses of this host */
1997 krb5_error_code KRB5_CALLCONV krb5_os_localaddr
1998 	(krb5_context,
1999 		krb5_address ***);
2000 krb5_error_code KRB5_CALLCONV krb5_get_default_realm
2001 	(krb5_context,
2002 		 char ** );
2003 krb5_error_code KRB5_CALLCONV krb5_set_default_realm
2004 	(krb5_context,
2005 		   const char * );
2006 void KRB5_CALLCONV krb5_free_default_realm
2007 	(krb5_context,
2008 		   char * );
2009 krb5_error_code KRB5_CALLCONV krb5_sname_to_principal
2010 	(krb5_context,
2011 		const char *,
2012 		   const char *,
2013 		   krb5_int32,
2014 		   krb5_principal *);
2015 krb5_error_code KRB5_CALLCONV
2016 krb5_change_password
2017 	(krb5_context context, krb5_creds *creds, char *newpw,
2018 			int *result_code, krb5_data *result_code_string,
2019 			krb5_data *result_string);
2020 krb5_error_code KRB5_CALLCONV
2021 krb5_set_password
2022 	(krb5_context context, krb5_creds *creds, char *newpw, krb5_principal change_password_for,
2023 			int *result_code, krb5_data *result_code_string, krb5_data *result_string);
2024 krb5_error_code KRB5_CALLCONV
2025 krb5_set_password_using_ccache
2026 	(krb5_context context, krb5_ccache ccache, char *newpw, krb5_principal change_password_for,
2027 			int *result_code, krb5_data *result_code_string, krb5_data *result_string);
2028 
2029 #if KRB5_PRIVATE
2030 krb5_error_code krb5_set_config_files
2031 	(krb5_context, const char **);
2032 
2033 krb5_error_code KRB5_CALLCONV krb5_get_default_config_files
2034 	(char ***filenames);
2035 
2036 void KRB5_CALLCONV krb5_free_config_files
2037 	(char **filenames);
2038 #endif
2039 
2040 krb5_error_code KRB5_CALLCONV
2041 krb5_get_profile
2042 	(krb5_context, struct _profile_t * /* profile_t */ *);
2043 
2044 #if KRB5_PRIVATE
2045 krb5_error_code krb5_send_tgs
2046 	(krb5_context,
2047 		krb5_flags,
2048 		const krb5_ticket_times *,
2049 		const krb5_enctype *,
2050 		krb5_const_principal,
2051 		krb5_address * const *,
2052 		krb5_authdata * const *,
2053 		krb5_pa_data * const *,
2054 		const krb5_data *,
2055 		krb5_creds *,
2056 		krb5_response * );
2057 #endif
2058 
2059 #if KRB5_DEPRECATED
2060 krb5_error_code KRB5_CALLCONV krb5_get_in_tkt
2061 	(krb5_context,
2062 		krb5_flags,
2063 		krb5_address * const *,
2064 		krb5_enctype *,
2065 		krb5_preauthtype *,
2066 		krb5_error_code ( * )(krb5_context,
2067 					krb5_enctype,
2068 					krb5_data *,
2069 					krb5_const_pointer,
2070 					krb5_keyblock **),
2071 		krb5_const_pointer,
2072 		krb5_error_code ( * )(krb5_context,
2073 					const krb5_keyblock *,
2074 					krb5_const_pointer,
2075 					krb5_kdc_rep * ),
2076 		krb5_const_pointer,
2077 		krb5_creds *,
2078 		krb5_ccache,
2079 		krb5_kdc_rep ** );
2080 
2081 krb5_error_code KRB5_CALLCONV krb5_get_in_tkt_with_password
2082 	(krb5_context,
2083 		krb5_flags,
2084 		krb5_address * const *,
2085 		krb5_enctype *,
2086 		krb5_preauthtype *,
2087 		const char *,
2088 		krb5_ccache,
2089 		krb5_creds *,
2090 		krb5_kdc_rep ** );
2091 
2092 krb5_error_code KRB5_CALLCONV krb5_get_in_tkt_with_skey
2093 	(krb5_context,
2094 		krb5_flags,
2095 		krb5_address * const *,
2096 		krb5_enctype *,
2097 		krb5_preauthtype *,
2098 		const krb5_keyblock *,
2099 		krb5_ccache,
2100 		krb5_creds *,
2101 		krb5_kdc_rep ** );
2102 
2103 krb5_error_code KRB5_CALLCONV krb5_get_in_tkt_with_keytab
2104 	(krb5_context,
2105 		krb5_flags,
2106 		krb5_address * const *,
2107 		krb5_enctype *,
2108 		krb5_preauthtype *,
2109 		krb5_keytab,
2110 		krb5_ccache,
2111 		krb5_creds *,
2112 		krb5_kdc_rep ** );
2113 #endif /* KRB5_DEPRECATED */
2114 
2115 #if KRB5_PRIVATE
2116 krb5_error_code krb5_decode_kdc_rep
2117 	(krb5_context,
2118 		krb5_data *,
2119 		const krb5_keyblock *,
2120 		krb5_kdc_rep ** );
2121 #endif
2122 
2123 krb5_error_code KRB5_CALLCONV krb5_rd_req
2124 	(krb5_context,
2125 		krb5_auth_context *,
2126 		const krb5_data *,
2127 		krb5_const_principal,
2128 		krb5_keytab,
2129 		krb5_flags *,
2130 		krb5_ticket **);
2131 
2132 #if KRB5_PRIVATE
2133 krb5_error_code krb5_rd_req_decoded
2134 	(krb5_context,
2135 		krb5_auth_context *,
2136 		const krb5_ap_req *,
2137 		krb5_const_principal,
2138 		krb5_keytab,
2139 		krb5_flags *,
2140 		krb5_ticket **);
2141 
2142 krb5_error_code krb5_rd_req_decoded_anyflag
2143 	(krb5_context,
2144 		krb5_auth_context *,
2145 		const krb5_ap_req *,
2146 		krb5_const_principal,
2147 		krb5_keytab,
2148 		krb5_flags *,
2149 		krb5_ticket **);
2150 #endif
2151 
2152 krb5_error_code KRB5_CALLCONV krb5_kt_read_service_key
2153 	(krb5_context,
2154 		krb5_pointer,
2155 		krb5_principal,
2156 		krb5_kvno,
2157 		krb5_enctype,
2158 		krb5_keyblock **);
2159 krb5_error_code KRB5_CALLCONV krb5_mk_safe
2160 	(krb5_context,
2161 		krb5_auth_context,
2162 		const krb5_data *,
2163 		krb5_data *,
2164 		krb5_replay_data *);
2165 krb5_error_code KRB5_CALLCONV krb5_mk_priv
2166 	(krb5_context,
2167 		krb5_auth_context,
2168 		const krb5_data *,
2169 		krb5_data *,
2170 		krb5_replay_data *);
2171 #if KRB5_PRIVATE
2172 krb5_error_code KRB5_CALLCONV krb5_cc_register
2173 	(krb5_context,
2174 		krb5_cc_ops *,
2175 		krb5_boolean );
2176 #endif
2177 
2178 krb5_error_code KRB5_CALLCONV krb5_sendauth
2179 	(krb5_context,
2180 		krb5_auth_context *,
2181 		krb5_pointer,
2182 		char *,
2183 		krb5_principal,
2184 		krb5_principal,
2185 		krb5_flags,
2186 		krb5_data *,
2187 		krb5_creds *,
2188 		krb5_ccache,
2189 		krb5_error **,
2190 		krb5_ap_rep_enc_part **,
2191 		krb5_creds **);
2192 
2193 krb5_error_code KRB5_CALLCONV krb5_recvauth
2194 	(krb5_context,
2195 		krb5_auth_context *,
2196 		krb5_pointer,
2197 		char *,
2198 		krb5_principal,
2199 		krb5_int32,
2200 		krb5_keytab,
2201 		krb5_ticket **);
2202 krb5_error_code KRB5_CALLCONV krb5_recvauth_version
2203 	(krb5_context,
2204 		krb5_auth_context *,
2205 		krb5_pointer,
2206 		krb5_principal,
2207 		krb5_int32,
2208 		krb5_keytab,
2209 		krb5_ticket **,
2210 		krb5_data *);
2211 
2212 #if KRB5_PRIVATE
2213 krb5_error_code krb5_walk_realm_tree
2214 	(krb5_context,
2215 		const krb5_data *,
2216 		const krb5_data *,
2217 		krb5_principal **,
2218 		int);
2219 #endif
2220 
2221 krb5_error_code KRB5_CALLCONV krb5_mk_ncred
2222 	(krb5_context,
2223 		krb5_auth_context,
2224 		krb5_creds **,
2225 		krb5_data **,
2226 		krb5_replay_data *);
2227 
2228 krb5_error_code KRB5_CALLCONV krb5_mk_1cred
2229 	(krb5_context,
2230 		krb5_auth_context,
2231 		krb5_creds *,
2232 		krb5_data **,
2233 		krb5_replay_data *);
2234 
2235 krb5_error_code KRB5_CALLCONV krb5_rd_cred
2236 	(krb5_context,
2237 		krb5_auth_context,
2238 		krb5_data *,
2239 		krb5_creds ***,
2240 		krb5_replay_data *);
2241 
2242 krb5_error_code KRB5_CALLCONV krb5_fwd_tgt_creds
2243 	(krb5_context,
2244 		krb5_auth_context,
2245 		char *,
2246 		krb5_principal,
2247 		krb5_principal,
2248 		krb5_ccache,
2249 		int forwardable,
2250 		krb5_data *);
2251 
2252 krb5_error_code KRB5_CALLCONV krb5_auth_con_init
2253 	(krb5_context,
2254 		krb5_auth_context *);
2255 
2256 krb5_error_code KRB5_CALLCONV krb5_auth_con_free
2257 	(krb5_context,
2258 		krb5_auth_context);
2259 
2260 krb5_error_code KRB5_CALLCONV krb5_auth_con_setflags
2261 	(krb5_context,
2262 		krb5_auth_context,
2263 		krb5_int32);
2264 
2265 krb5_error_code KRB5_CALLCONV krb5_auth_con_getflags
2266 	(krb5_context,
2267 		krb5_auth_context,
2268 		krb5_int32 *);
2269 
2270 krb5_error_code KRB5_CALLCONV
2271 krb5_auth_con_set_checksum_func (krb5_context, krb5_auth_context,
2272 				 krb5_mk_req_checksum_func, void *);
2273 
2274 krb5_error_code KRB5_CALLCONV
2275 krb5_auth_con_get_checksum_func( krb5_context, krb5_auth_context,
2276 				 krb5_mk_req_checksum_func *, void **);
2277 
2278 krb5_error_code KRB5_CALLCONV_WRONG krb5_auth_con_setaddrs
2279 	(krb5_context,
2280 		krb5_auth_context,
2281 		krb5_address *,
2282 		krb5_address *);
2283 
2284 krb5_error_code KRB5_CALLCONV krb5_auth_con_getaddrs
2285 	(krb5_context,
2286 		krb5_auth_context,
2287 		krb5_address **,
2288 		krb5_address **);
2289 
2290 krb5_error_code KRB5_CALLCONV krb5_auth_con_setports
2291 	(krb5_context,
2292 		krb5_auth_context,
2293 		krb5_address *,
2294 		krb5_address *);
2295 
2296 krb5_error_code KRB5_CALLCONV krb5_auth_con_setuseruserkey
2297 	(krb5_context,
2298 		krb5_auth_context,
2299 		krb5_keyblock *);
2300 
2301 krb5_error_code KRB5_CALLCONV krb5_auth_con_getkey
2302 	(krb5_context,
2303 		krb5_auth_context,
2304 		krb5_keyblock **);
2305 
2306 krb5_error_code KRB5_CALLCONV krb5_auth_con_getsendsubkey(
2307     krb5_context, krb5_auth_context, krb5_keyblock **);
2308 
2309 krb5_error_code KRB5_CALLCONV krb5_auth_con_getrecvsubkey(
2310     krb5_context, krb5_auth_context, krb5_keyblock **);
2311 
2312 krb5_error_code KRB5_CALLCONV krb5_auth_con_setsendsubkey(
2313     krb5_context, krb5_auth_context, krb5_keyblock *);
2314 
2315 krb5_error_code KRB5_CALLCONV krb5_auth_con_setrecvsubkey(
2316     krb5_context, krb5_auth_context, krb5_keyblock *);
2317 
2318 #if KRB5_DEPRECATED
2319 krb5_error_code KRB5_CALLCONV krb5_auth_con_getlocalsubkey
2320 	(krb5_context,
2321 		krb5_auth_context,
2322 		krb5_keyblock **);
2323 
2324 krb5_error_code KRB5_CALLCONV krb5_auth_con_getremotesubkey
2325 	(krb5_context,
2326 		krb5_auth_context,
2327 		krb5_keyblock **);
2328 #endif
2329 
2330 #if KRB5_PRIVATE
2331 krb5_error_code KRB5_CALLCONV krb5_auth_con_set_req_cksumtype
2332 	(krb5_context,
2333 		krb5_auth_context,
2334 		krb5_cksumtype);
2335 
2336 krb5_error_code krb5_auth_con_set_safe_cksumtype
2337 	(krb5_context,
2338 		krb5_auth_context,
2339 		krb5_cksumtype);
2340 #endif
2341 
2342 krb5_error_code KRB5_CALLCONV krb5_auth_con_getlocalseqnumber
2343 	(krb5_context,
2344 		krb5_auth_context,
2345 		krb5_int32 *);
2346 
2347 krb5_error_code KRB5_CALLCONV krb5_auth_con_getremoteseqnumber
2348 	(krb5_context,
2349 		krb5_auth_context,
2350 		krb5_int32 *);
2351 
2352 #if KRB5_DEPRECATED
2353 krb5_error_code KRB5_CALLCONV krb5_auth_con_initivector
2354 	(krb5_context,
2355 		krb5_auth_context);
2356 #endif
2357 
2358 #if KRB5_PRIVATE
2359 krb5_error_code krb5_auth_con_setivector
2360 	(krb5_context,
2361 		krb5_auth_context,
2362 		krb5_pointer);
2363 
2364 krb5_error_code krb5_auth_con_getivector
2365 	(krb5_context,
2366 		krb5_auth_context,
2367 		krb5_pointer *);
2368 #endif
2369 
2370 krb5_error_code KRB5_CALLCONV krb5_auth_con_setrcache
2371 	(krb5_context,
2372 		krb5_auth_context,
2373 		krb5_rcache);
2374 
2375 krb5_error_code KRB5_CALLCONV_WRONG krb5_auth_con_getrcache
2376 	(krb5_context,
2377 		krb5_auth_context,
2378 		krb5_rcache *);
2379 
2380 #if KRB5_PRIVATE
2381 krb5_error_code krb5_auth_con_setpermetypes
2382 	(krb5_context,
2383 	    krb5_auth_context,
2384 	    const krb5_enctype *);
2385 
2386 krb5_error_code krb5_auth_con_getpermetypes
2387 	(krb5_context,
2388 	    krb5_auth_context,
2389 	    krb5_enctype **);
2390 #endif
2391 
2392 krb5_error_code KRB5_CALLCONV krb5_auth_con_getauthenticator
2393 	(krb5_context,
2394 		krb5_auth_context,
2395 		krb5_authenticator **);
2396 
2397 #define KRB5_REALM_BRANCH_CHAR '.'
2398 
2399 /*
2400  * end "func-proto.h"
2401  */
2402 
2403 /*
2404  * begin stuff from libos.h
2405  */
2406 
2407 #if KRB5_PRIVATE
2408 krb5_error_code krb5_read_message (krb5_context, krb5_pointer, krb5_data *);
2409 krb5_error_code krb5_write_message (krb5_context, krb5_pointer, krb5_data *);
2410 int krb5_net_read (krb5_context, int , char *, int);
2411 int krb5_net_write (krb5_context, int , const char *, int);
2412 #endif
2413 
2414 krb5_error_code KRB5_CALLCONV krb5_read_password
2415 	(krb5_context,
2416 		const char *,
2417 		const char *,
2418 		char *,
2419 		unsigned int * );
2420 krb5_error_code KRB5_CALLCONV krb5_aname_to_localname
2421 	(krb5_context,
2422 		krb5_const_principal,
2423 		int,
2424 		char * );
2425 krb5_error_code KRB5_CALLCONV krb5_get_host_realm
2426 	(krb5_context,
2427 		const char *,
2428 		char *** );
2429 krb5_error_code KRB5_CALLCONV krb5_get_fallback_host_realm
2430 	(krb5_context,
2431 		krb5_data *,
2432 		char *** );
2433 krb5_error_code KRB5_CALLCONV krb5_free_host_realm
2434 	(krb5_context,
2435 		char * const * );
2436 #if KRB5_PRIVATE
2437 krb5_error_code KRB5_CALLCONV krb5_get_realm_domain
2438 	(krb5_context,
2439 		const char *,
2440 		char ** );
2441 #endif
2442 krb5_boolean KRB5_CALLCONV krb5_kuserok
2443 	(krb5_context,
2444 		krb5_principal, const char *);
2445 krb5_error_code KRB5_CALLCONV krb5_auth_con_genaddrs
2446 	(krb5_context,
2447 		krb5_auth_context,
2448 		int, int);
2449 #if KRB5_PRIVATE
2450 krb5_error_code krb5_gen_portaddr
2451 	(krb5_context,
2452 		const krb5_address *,
2453 		krb5_const_pointer,
2454 		krb5_address **);
2455 krb5_error_code krb5_gen_replay_name
2456 	(krb5_context,
2457 		const krb5_address *,
2458 		const char *,
2459 		char **);
2460 krb5_error_code krb5_make_fulladdr
2461 	(krb5_context,
2462 		krb5_address *,
2463 		krb5_address *,
2464 		krb5_address *);
2465 #endif
2466 
2467 krb5_error_code KRB5_CALLCONV krb5_set_real_time
2468 	(krb5_context, krb5_int32, krb5_int32);
2469 
2470 #if KRB5_PRIVATE
2471 krb5_error_code krb5_set_debugging_time
2472 	(krb5_context, krb5_int32, krb5_int32);
2473 krb5_error_code krb5_use_natural_time
2474 	(krb5_context);
2475 #endif
2476 krb5_error_code KRB5_CALLCONV krb5_get_time_offsets
2477 	(krb5_context, krb5_int32 *, krb5_int32 *);
2478 #if KRB5_PRIVATE
2479 krb5_error_code krb5_set_time_offsets
2480 	(krb5_context, krb5_int32, krb5_int32);
2481 #endif
2482 
2483 /* str_conv.c */
2484 krb5_error_code KRB5_CALLCONV krb5_string_to_enctype
2485 	(char *, krb5_enctype *);
2486 krb5_error_code KRB5_CALLCONV krb5_string_to_salttype
2487 	(char *, krb5_int32 *);
2488 krb5_error_code KRB5_CALLCONV krb5_string_to_cksumtype
2489 	(char *, krb5_cksumtype *);
2490 krb5_error_code KRB5_CALLCONV krb5_string_to_timestamp
2491 	(char *, krb5_timestamp *);
2492 krb5_error_code KRB5_CALLCONV krb5_string_to_deltat
2493 	(char *, krb5_deltat *);
2494 krb5_error_code KRB5_CALLCONV krb5_enctype_to_string
2495 	(krb5_enctype, char *, size_t);
2496 /* Solaris Kerberos */
2497 krb5_error_code KRB5_CALLCONV krb5_enctype_to_istring
2498 	(krb5_enctype, char *, size_t);
2499 krb5_error_code KRB5_CALLCONV krb5_salttype_to_string
2500 	(krb5_int32, char *, size_t);
2501 krb5_error_code KRB5_CALLCONV krb5_cksumtype_to_string
2502 	(krb5_cksumtype, char *, size_t);
2503 krb5_error_code KRB5_CALLCONV krb5_timestamp_to_string
2504 	(krb5_timestamp, char *, size_t);
2505 krb5_error_code KRB5_CALLCONV krb5_timestamp_to_sfstring
2506 	(krb5_timestamp, char *, size_t, char *);
2507 krb5_error_code KRB5_CALLCONV krb5_deltat_to_string
2508 	(krb5_deltat, char *, size_t);
2509 
2510 
2511 /*
2512  * end stuff from libos.h
2513  */
2514 
2515 /*
2516  * begin "k5-free.h"
2517  */
2518 
2519 /* to keep lint happy */
2520 #ifdef _KERNEL
2521 #define krb5_xfree_wrap(val,n) kmem_free((char *)(val),n)
2522 #else
2523 #define krb5_xfree_wrap(val,n) free((char *)(val))
2524 #define krb5_xfree(val) free((char *)(val))
2525 #endif
2526 
2527 /*
2528  * end "k5-free.h"
2529  */
2530 
2531 /* The name of the Kerberos ticket granting service... and its size */
2532 #define	KRB5_TGS_NAME		"krbtgt"
2533 #define KRB5_TGS_NAME_SIZE	6
2534 
2535 /* flags for recvauth */
2536 #define KRB5_RECVAUTH_SKIP_VERSION	0x0001
2537 #define KRB5_RECVAUTH_BADAUTHVERS	0x0002
2538 /* initial ticket api functions */
2539 
2540 typedef struct _krb5_prompt {
2541     char *prompt;
2542     int hidden;
2543     krb5_data *reply;
2544 } krb5_prompt;
2545 
2546 typedef krb5_error_code (KRB5_CALLCONV *krb5_prompter_fct)(krb5_context context,
2547 					     void *data,
2548 					     const char *name,
2549 					     const char *banner,
2550 					     int num_prompts,
2551 					     krb5_prompt prompts[]);
2552 
2553 
2554 krb5_error_code KRB5_CALLCONV
2555 krb5_prompter_posix (krb5_context context,
2556 		void *data,
2557 		const char *name,
2558 		const char *banner,
2559 		int num_prompts,
2560 		krb5_prompt prompts[]);
2561 
2562 typedef struct _krb5_get_init_creds_opt {
2563     krb5_flags flags;
2564     krb5_deltat tkt_life;
2565     krb5_deltat renew_life;
2566     int forwardable;
2567     int proxiable;
2568     krb5_enctype *etype_list;
2569     int etype_list_length;
2570     krb5_address **address_list;
2571     krb5_preauthtype *preauth_list;
2572     int preauth_list_length;
2573     krb5_data *salt;
2574 } krb5_get_init_creds_opt;
2575 
2576 #define KRB5_GET_INIT_CREDS_OPT_TKT_LIFE	0x0001
2577 #define KRB5_GET_INIT_CREDS_OPT_RENEW_LIFE	0x0002
2578 #define KRB5_GET_INIT_CREDS_OPT_FORWARDABLE	0x0004
2579 #define KRB5_GET_INIT_CREDS_OPT_PROXIABLE	0x0008
2580 #define KRB5_GET_INIT_CREDS_OPT_ETYPE_LIST	0x0010
2581 #define KRB5_GET_INIT_CREDS_OPT_ADDRESS_LIST	0x0020
2582 #define KRB5_GET_INIT_CREDS_OPT_PREAUTH_LIST	0x0040
2583 #define KRB5_GET_INIT_CREDS_OPT_SALT		0x0080
2584 #define KRB5_GET_INIT_CREDS_OPT_CHG_PWD_PRMPT	0x0100
2585 
2586 krb5_error_code KRB5_CALLCONV
2587 krb5_get_init_creds_opt_alloc
2588 (krb5_context context,
2589 		krb5_get_init_creds_opt **opt);
2590 
2591 void KRB5_CALLCONV
2592 krb5_get_init_creds_opt_free
2593 (krb5_context context,
2594 		krb5_get_init_creds_opt *opt);
2595 
2596 void KRB5_CALLCONV
2597 krb5_get_init_creds_opt_init
2598 (krb5_get_init_creds_opt *opt);
2599 
2600 void KRB5_CALLCONV
2601 krb5_get_init_creds_opt_set_tkt_life
2602 (krb5_get_init_creds_opt *opt,
2603 		krb5_deltat tkt_life);
2604 
2605 void KRB5_CALLCONV
2606 krb5_get_init_creds_opt_set_renew_life
2607 (krb5_get_init_creds_opt *opt,
2608 		krb5_deltat renew_life);
2609 
2610 void KRB5_CALLCONV
2611 krb5_get_init_creds_opt_set_forwardable
2612 (krb5_get_init_creds_opt *opt,
2613 		int forwardable);
2614 
2615 void KRB5_CALLCONV
2616 krb5_get_init_creds_opt_set_proxiable
2617 (krb5_get_init_creds_opt *opt,
2618 		int proxiable);
2619 
2620 void KRB5_CALLCONV
2621 krb5_get_init_creds_opt_set_etype_list
2622 (krb5_get_init_creds_opt *opt,
2623 		krb5_enctype *etype_list,
2624 		int etype_list_length);
2625 
2626 void KRB5_CALLCONV
2627 krb5_get_init_creds_opt_set_address_list
2628 (krb5_get_init_creds_opt *opt,
2629 		krb5_address **addresses);
2630 
2631 void KRB5_CALLCONV
2632 krb5_get_init_creds_opt_set_preauth_list
2633 (krb5_get_init_creds_opt *opt,
2634 		krb5_preauthtype *preauth_list,
2635 		int preauth_list_length);
2636 
2637 void KRB5_CALLCONV
2638 krb5_get_init_creds_opt_set_salt
2639 (krb5_get_init_creds_opt *opt,
2640 		krb5_data *salt);
2641 
2642 void KRB5_CALLCONV
2643 krb5_get_init_creds_opt_set_change_password_prompt
2644 (krb5_get_init_creds_opt *opt,
2645 		int prompt);
2646 
2647 /* Generic preauth option attribute/value pairs */
2648 typedef struct _krb5_gic_opt_pa_data {
2649     char *attr;
2650     char *value;
2651 } krb5_gic_opt_pa_data;
2652 
2653 /*
2654  * This function allows the caller to supply options to preauth
2655  * plugins.  Preauth plugin modules are given a chance to look
2656  * at each option at the time this function is called in ordre
2657  * to check the validity of the option.
2658  * The 'opt' pointer supplied to this function must have been
2659  * obtained using krb5_get_init_creds_opt_alloc()
2660  */
2661 krb5_error_code KRB5_CALLCONV
2662 krb5_get_init_creds_opt_set_pa
2663 		(krb5_context context,
2664 		krb5_get_init_creds_opt *opt,
2665 		const char *attr,
2666 		const char *value);
2667 
2668 krb5_error_code KRB5_CALLCONV
2669 krb5_get_init_creds_password
2670 (krb5_context context,
2671 		krb5_creds *creds,
2672 		krb5_principal client,
2673 		char *password,
2674 		krb5_prompter_fct prompter,
2675 		void *data,
2676 		krb5_deltat start_time,
2677 		char *in_tkt_service,
2678 		krb5_get_init_creds_opt *k5_gic_options);
2679 
2680 krb5_error_code KRB5_CALLCONV
2681 krb5_get_init_creds_keytab
2682 (krb5_context context,
2683 		krb5_creds *creds,
2684 		krb5_principal client,
2685 		krb5_keytab arg_keytab,
2686 		krb5_deltat start_time,
2687 		char *in_tkt_service,
2688 		krb5_get_init_creds_opt *k5_gic_options);
2689 
2690 typedef struct _krb5_verify_init_creds_opt {
2691     krb5_flags flags;
2692     int ap_req_nofail;
2693 } krb5_verify_init_creds_opt;
2694 
2695 #define KRB5_VERIFY_INIT_CREDS_OPT_AP_REQ_NOFAIL	0x0001
2696 
2697 void KRB5_CALLCONV
2698 krb5_verify_init_creds_opt_init
2699 (krb5_verify_init_creds_opt *k5_vic_options);
2700 void KRB5_CALLCONV
2701 krb5_verify_init_creds_opt_set_ap_req_nofail
2702 (krb5_verify_init_creds_opt *k5_vic_options,
2703 		int ap_req_nofail);
2704 
2705 krb5_error_code KRB5_CALLCONV
2706 krb5_verify_init_creds
2707 (krb5_context context,
2708 		krb5_creds *creds,
2709 		krb5_principal ap_req_server,
2710 		krb5_keytab ap_req_keytab,
2711 		krb5_ccache *ccache,
2712 		krb5_verify_init_creds_opt *k5_vic_options);
2713 
2714 krb5_error_code KRB5_CALLCONV
2715 krb5_get_validated_creds
2716 (krb5_context context,
2717 		krb5_creds *creds,
2718 		krb5_principal client,
2719 		krb5_ccache ccache,
2720 		char *in_tkt_service);
2721 
2722 krb5_error_code KRB5_CALLCONV
2723 krb5_get_renewed_creds
2724 (krb5_context context,
2725 		krb5_creds *creds,
2726 		krb5_principal client,
2727 		krb5_ccache ccache,
2728 		char *in_tkt_service);
2729 
2730 krb5_error_code KRB5_CALLCONV
2731 krb5_decode_ticket
2732 (const krb5_data *code,
2733 		krb5_ticket **rep);
2734 
2735 void KRB5_CALLCONV
2736 krb5_appdefault_string
2737 (krb5_context context,
2738 		const char *appname,
2739 	        const krb5_data *realm,
2740  		const char *option,
2741 		const char *default_value,
2742 		char ** ret_value);
2743 
2744 void KRB5_CALLCONV
2745 krb5_appdefault_boolean
2746 (krb5_context context,
2747 		const char *appname,
2748 	        const krb5_data *realm,
2749  		const char *option,
2750 		int default_value,
2751 		int *ret_value);
2752 
2753 #if KRB5_PRIVATE
2754 /*
2755  * The realm iterator functions
2756  */
2757 
2758 krb5_error_code KRB5_CALLCONV krb5_realm_iterator_create
2759 	(krb5_context context, void **iter_p);
2760 
2761 krb5_error_code KRB5_CALLCONV krb5_realm_iterator
2762 	(krb5_context context, void **iter_p, char **ret_realm);
2763 
2764 void KRB5_CALLCONV krb5_realm_iterator_free
2765 	(krb5_context context, void **iter_p);
2766 
2767 void KRB5_CALLCONV krb5_free_realm_string
2768 	(krb5_context context, char *str);
2769 #endif
2770 
2771 /*
2772  * The realm iterator functions
2773  */
2774 
2775 krb5_error_code KRB5_CALLCONV krb5_realm_iterator_create
2776 	(krb5_context context, void **iter_p);
2777 
2778 krb5_error_code KRB5_CALLCONV krb5_realm_iterator
2779 	(krb5_context context, void **iter_p, char **ret_realm);
2780 
2781 void KRB5_CALLCONV krb5_realm_iterator_free
2782 	(krb5_context context, void **iter_p);
2783 
2784 void KRB5_CALLCONV krb5_free_realm_string
2785 	(krb5_context context, char *str);
2786 
2787 /*
2788  * Prompter enhancements
2789  */
2790 
2791 #define KRB5_PROMPT_TYPE_PASSWORD            0x1
2792 #define KRB5_PROMPT_TYPE_NEW_PASSWORD        0x2
2793 #define KRB5_PROMPT_TYPE_NEW_PASSWORD_AGAIN  0x3
2794 #define KRB5_PROMPT_TYPE_PREAUTH             0x4
2795 
2796 typedef krb5_int32 krb5_prompt_type;
2797 
2798 krb5_prompt_type* KRB5_CALLCONV krb5_get_prompt_types
2799 	(krb5_context context);
2800 
2801 /* Error reporting */
2802 void KRB5_CALLCONV_C
2803 krb5_set_error_message (krb5_context, krb5_error_code, const char *, ...);
2804 #ifdef va_start
2805 void KRB5_CALLCONV
2806 krb5_vset_error_message (krb5_context, krb5_error_code, const char *, va_list);
2807 #endif
2808 /*
2809  * The behavior of krb5_get_error_message is only defined the first
2810  * time it is called after a failed call to a krb5 function using the
2811  * same context, and only when the error code passed in is the same as
2812  * that returned by the krb5 function.  Future versions may return the
2813  * same string for the second and following calls.
2814  *
2815  * The string returned by this function must be freed using
2816  * krb5_free_error_message.
2817  */
2818 const char * KRB5_CALLCONV
2819 krb5_get_error_message (krb5_context, krb5_error_code);
2820 void KRB5_CALLCONV
2821 krb5_free_error_message (krb5_context, const char *);
2822 void KRB5_CALLCONV
2823 krb5_clear_error_message (krb5_context);
2824 
2825 
2826 #if TARGET_OS_MAC
2827 #    pragma pack(pop)
2828 #endif
2829 
2830 KRB5INT_END_DECLS
2831 
2832 /* Don't use this!  We're going to phase it out.  It's just here to keep
2833    applications from breaking right away.  */
2834 #define krb5_const const
2835 
2836 #endif /* KRB5_GENERAL__ */
2837 
2838 
2839 /*
2840  * krb5_err.h:
2841  * This file is automatically generated; please do not edit it.
2842  */
2843 
2844 #define KRB5KDC_ERR_NONE                         (-1765328384L)
2845 #define KRB5KDC_ERR_NAME_EXP                     (-1765328383L)
2846 #define KRB5KDC_ERR_SERVICE_EXP                  (-1765328382L)
2847 #define KRB5KDC_ERR_BAD_PVNO                     (-1765328381L)
2848 #define KRB5KDC_ERR_C_OLD_MAST_KVNO              (-1765328380L)
2849 #define KRB5KDC_ERR_S_OLD_MAST_KVNO              (-1765328379L)
2850 #define KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN          (-1765328378L)
2851 #define KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN          (-1765328377L)
2852 #define KRB5KDC_ERR_PRINCIPAL_NOT_UNIQUE         (-1765328376L)
2853 #define KRB5KDC_ERR_NULL_KEY                     (-1765328375L)
2854 #define KRB5KDC_ERR_CANNOT_POSTDATE              (-1765328374L)
2855 #define KRB5KDC_ERR_NEVER_VALID                  (-1765328373L)
2856 #define KRB5KDC_ERR_POLICY                       (-1765328372L)
2857 #define KRB5KDC_ERR_BADOPTION                    (-1765328371L)
2858 #define KRB5KDC_ERR_ETYPE_NOSUPP                 (-1765328370L)
2859 #define KRB5KDC_ERR_SUMTYPE_NOSUPP               (-1765328369L)
2860 #define KRB5KDC_ERR_PADATA_TYPE_NOSUPP           (-1765328368L)
2861 #define KRB5KDC_ERR_TRTYPE_NOSUPP                (-1765328367L)
2862 #define KRB5KDC_ERR_CLIENT_REVOKED               (-1765328366L)
2863 #define KRB5KDC_ERR_SERVICE_REVOKED              (-1765328365L)
2864 #define KRB5KDC_ERR_TGT_REVOKED                  (-1765328364L)
2865 #define KRB5KDC_ERR_CLIENT_NOTYET                (-1765328363L)
2866 #define KRB5KDC_ERR_SERVICE_NOTYET               (-1765328362L)
2867 #define KRB5KDC_ERR_KEY_EXP                      (-1765328361L)
2868 #define KRB5KDC_ERR_PREAUTH_FAILED               (-1765328360L)
2869 #define KRB5KDC_ERR_PREAUTH_REQUIRED             (-1765328359L)
2870 #define KRB5KDC_ERR_SERVER_NOMATCH               (-1765328358L)
2871 #define KRB5PLACEHOLD_27                         (-1765328357L)
2872 #define KRB5PLACEHOLD_28                         (-1765328356L)
2873 #define KRB5KDC_ERR_SVC_UNAVAILABLE              (-1765328355L)
2874 #define KRB5PLACEHOLD_30                         (-1765328354L)
2875 #define KRB5KRB_AP_ERR_BAD_INTEGRITY             (-1765328353L)
2876 #define KRB5KRB_AP_ERR_TKT_EXPIRED               (-1765328352L)
2877 #define KRB5KRB_AP_ERR_TKT_NYV                   (-1765328351L)
2878 #define KRB5KRB_AP_ERR_REPEAT                    (-1765328350L)
2879 #define KRB5KRB_AP_ERR_NOT_US                    (-1765328349L)
2880 #define KRB5KRB_AP_ERR_BADMATCH                  (-1765328348L)
2881 #define KRB5KRB_AP_ERR_SKEW                      (-1765328347L)
2882 #define KRB5KRB_AP_ERR_BADADDR                   (-1765328346L)
2883 #define KRB5KRB_AP_ERR_BADVERSION                (-1765328345L)
2884 #define KRB5KRB_AP_ERR_MSG_TYPE                  (-1765328344L)
2885 #define KRB5KRB_AP_ERR_MODIFIED                  (-1765328343L)
2886 #define KRB5KRB_AP_ERR_BADORDER                  (-1765328342L)
2887 #define KRB5KRB_AP_ERR_ILL_CR_TKT                (-1765328341L)
2888 #define KRB5KRB_AP_ERR_BADKEYVER                 (-1765328340L)
2889 #define KRB5KRB_AP_ERR_NOKEY                     (-1765328339L)
2890 #define KRB5KRB_AP_ERR_MUT_FAIL                  (-1765328338L)
2891 #define KRB5KRB_AP_ERR_BADDIRECTION              (-1765328337L)
2892 #define KRB5KRB_AP_ERR_METHOD                    (-1765328336L)
2893 #define KRB5KRB_AP_ERR_BADSEQ                    (-1765328335L)
2894 #define KRB5KRB_AP_ERR_INAPP_CKSUM               (-1765328334L)
2895 #define KRB5KRB_AP_PATH_NOT_ACCEPTED             (-1765328333L)
2896 #define KRB5KRB_ERR_RESPONSE_TOO_BIG             (-1765328332L)
2897 #define KRB5PLACEHOLD_53                         (-1765328331L)
2898 #define KRB5PLACEHOLD_54                         (-1765328330L)
2899 #define KRB5PLACEHOLD_55                         (-1765328329L)
2900 #define KRB5PLACEHOLD_56                         (-1765328328L)
2901 #define KRB5PLACEHOLD_57                         (-1765328327L)
2902 #define KRB5PLACEHOLD_58                         (-1765328326L)
2903 #define KRB5PLACEHOLD_59                         (-1765328325L)
2904 #define KRB5KRB_ERR_GENERIC                      (-1765328324L)
2905 #define KRB5KRB_ERR_FIELD_TOOLONG                (-1765328323L)
2906 #define KRB5KDC_ERR_CLIENT_NOT_TRUSTED           (-1765328322L)
2907 #define KRB5KDC_ERR_KDC_NOT_TRUSTED              (-1765328321L)
2908 #define KRB5KDC_ERR_INVALID_SIG                  (-1765328320L)
2909 #define KRB5KDC_ERR_DH_KEY_PARAMETERS_NOT_ACCEPTED (-1765328319L)
2910 #define KRB5KDC_ERR_CERTIFICATE_MISMATCH         (-1765328318L)
2911 #define KRB5PLACEHOLD_67                         (-1765328317L)
2912 #define KRB5PLACEHOLD_68                         (-1765328316L)
2913 #define KRB5PLACEHOLD_69                         (-1765328315L)
2914 #define KRB5KDC_ERR_CANT_VERIFY_CERTIFICATE      (-1765328314L)
2915 #define KRB5KDC_ERR_INVALID_CERTIFICATE          (-1765328313L)
2916 #define KRB5KDC_ERR_REVOKED_CERTIFICATE          (-1765328312L)
2917 #define KRB5KDC_ERR_REVOCATION_STATUS_UNKNOWN    (-1765328311L)
2918 #define KRB5KDC_ERR_REVOCATION_STATUS_UNAVAILABLE (-1765328310L)
2919 #define KRB5KDC_ERR_CLIENT_NAME_MISMATCH         (-1765328309L)
2920 #define KRB5KDC_ERR_KDC_NAME_MISMATCH            (-1765328308L)
2921 #define KRB5KDC_ERR_INCONSISTENT_KEY_PURPOSE     (-1765328307L)
2922 #define KRB5KDC_ERR_DIGEST_IN_CERT_NOT_ACCEPTED  (-1765328306L)
2923 #define KRB5KDC_ERR_PA_CHECKSUM_MUST_BE_INCLUDED (-1765328305L)
2924 #define KRB5KDC_ERR_DIGEST_IN_SIGNED_DATA_NOT_ACCEPTED (-1765328304L)
2925 #define KRB5KDC_ERR_PUBLIC_KEY_ENCRYPTION_NOT_SUPPORTED (-1765328303L)
2926 #define KRB5PLACEHOLD_82                         (-1765328302L)
2927 #define KRB5PLACEHOLD_83                         (-1765328301L)
2928 #define KRB5PLACEHOLD_84                         (-1765328300L)
2929 #define KRB5PLACEHOLD_85                         (-1765328299L)
2930 #define KRB5PLACEHOLD_86                         (-1765328298L)
2931 #define KRB5PLACEHOLD_87                         (-1765328297L)
2932 #define KRB5PLACEHOLD_88                         (-1765328296L)
2933 #define KRB5PLACEHOLD_89                         (-1765328295L)
2934 #define KRB5PLACEHOLD_90                         (-1765328294L)
2935 #define KRB5PLACEHOLD_91                         (-1765328293L)
2936 #define KRB5PLACEHOLD_92                         (-1765328292L)
2937 #define KRB5PLACEHOLD_93                         (-1765328291L)
2938 #define KRB5PLACEHOLD_94                         (-1765328290L)
2939 #define KRB5PLACEHOLD_95                         (-1765328289L)
2940 #define KRB5PLACEHOLD_96                         (-1765328288L)
2941 #define KRB5PLACEHOLD_97                         (-1765328287L)
2942 #define KRB5PLACEHOLD_98                         (-1765328286L)
2943 #define KRB5PLACEHOLD_99                         (-1765328285L)
2944 #define KRB5PLACEHOLD_100                        (-1765328284L)
2945 #define KRB5PLACEHOLD_101                        (-1765328283L)
2946 #define KRB5PLACEHOLD_102                        (-1765328282L)
2947 #define KRB5PLACEHOLD_103                        (-1765328281L)
2948 #define KRB5PLACEHOLD_104                        (-1765328280L)
2949 #define KRB5PLACEHOLD_105                        (-1765328279L)
2950 #define KRB5PLACEHOLD_106                        (-1765328278L)
2951 #define KRB5PLACEHOLD_107                        (-1765328277L)
2952 #define KRB5PLACEHOLD_108                        (-1765328276L)
2953 #define KRB5PLACEHOLD_109                        (-1765328275L)
2954 #define KRB5PLACEHOLD_110                        (-1765328274L)
2955 #define KRB5PLACEHOLD_111                        (-1765328273L)
2956 #define KRB5PLACEHOLD_112                        (-1765328272L)
2957 #define KRB5PLACEHOLD_113                        (-1765328271L)
2958 #define KRB5PLACEHOLD_114                        (-1765328270L)
2959 #define KRB5PLACEHOLD_115                        (-1765328269L)
2960 #define KRB5PLACEHOLD_116                        (-1765328268L)
2961 #define KRB5PLACEHOLD_117                        (-1765328267L)
2962 #define KRB5PLACEHOLD_118                        (-1765328266L)
2963 #define KRB5PLACEHOLD_119                        (-1765328265L)
2964 #define KRB5PLACEHOLD_120                        (-1765328264L)
2965 #define KRB5PLACEHOLD_121                        (-1765328263L)
2966 #define KRB5PLACEHOLD_122                        (-1765328262L)
2967 #define KRB5PLACEHOLD_123                        (-1765328261L)
2968 #define KRB5PLACEHOLD_124                        (-1765328260L)
2969 #define KRB5PLACEHOLD_125                        (-1765328259L)
2970 #define KRB5PLACEHOLD_126                        (-1765328258L)
2971 #define KRB5PLACEHOLD_127                        (-1765328257L)
2972 #define KRB5_ERR_RCSID                           (-1765328256L)
2973 #define KRB5_LIBOS_BADLOCKFLAG                   (-1765328255L)
2974 #define KRB5_LIBOS_CANTREADPWD                   (-1765328254L)
2975 #define KRB5_LIBOS_BADPWDMATCH                   (-1765328253L)
2976 #define KRB5_LIBOS_PWDINTR                       (-1765328252L)
2977 #define KRB5_PARSE_ILLCHAR                       (-1765328251L)
2978 #define KRB5_PARSE_MALFORMED                     (-1765328250L)
2979 #define KRB5_CONFIG_CANTOPEN                     (-1765328249L)
2980 #define KRB5_CONFIG_BADFORMAT                    (-1765328248L)
2981 #define KRB5_CONFIG_NOTENUFSPACE                 (-1765328247L)
2982 #define KRB5_BADMSGTYPE                          (-1765328246L)
2983 #define KRB5_CC_BADNAME                          (-1765328245L)
2984 #define KRB5_CC_UNKNOWN_TYPE                     (-1765328244L)
2985 #define KRB5_CC_NOTFOUND                         (-1765328243L)
2986 #define KRB5_CC_END                              (-1765328242L)
2987 #define KRB5_NO_TKT_SUPPLIED                     (-1765328241L)
2988 #define KRB5KRB_AP_WRONG_PRINC                   (-1765328240L)
2989 #define KRB5KRB_AP_ERR_TKT_INVALID               (-1765328239L)
2990 #define KRB5_PRINC_NOMATCH                       (-1765328238L)
2991 #define KRB5_KDCREP_MODIFIED                     (-1765328237L)
2992 #define KRB5_KDCREP_SKEW                         (-1765328236L)
2993 #define KRB5_IN_TKT_REALM_MISMATCH               (-1765328235L)
2994 #define KRB5_PROG_ETYPE_NOSUPP                   (-1765328234L)
2995 #define KRB5_PROG_KEYTYPE_NOSUPP                 (-1765328233L)
2996 #define KRB5_WRONG_ETYPE                         (-1765328232L)
2997 #define KRB5_PROG_SUMTYPE_NOSUPP                 (-1765328231L)
2998 #define KRB5_REALM_UNKNOWN                       (-1765328230L)
2999 #define KRB5_SERVICE_UNKNOWN                     (-1765328229L)
3000 #define KRB5_KDC_UNREACH                         (-1765328228L)
3001 #define KRB5_NO_LOCALNAME                        (-1765328227L)
3002 #define KRB5_MUTUAL_FAILED                       (-1765328226L)
3003 #define KRB5_RC_TYPE_EXISTS                      (-1765328225L)
3004 #define KRB5_RC_MALLOC                           (-1765328224L)
3005 #define KRB5_RC_TYPE_NOTFOUND                    (-1765328223L)
3006 #define KRB5_RC_UNKNOWN                          (-1765328222L)
3007 #define KRB5_RC_REPLAY                           (-1765328221L)
3008 #define KRB5_RC_IO                               (-1765328220L)
3009 #define KRB5_RC_NOIO                             (-1765328219L)
3010 #define KRB5_RC_PARSE                            (-1765328218L)
3011 #define KRB5_RC_IO_EOF                           (-1765328217L)
3012 #define KRB5_RC_IO_MALLOC                        (-1765328216L)
3013 #define KRB5_RC_IO_PERM                          (-1765328215L)
3014 #define KRB5_RC_IO_IO                            (-1765328214L)
3015 #define KRB5_RC_IO_UNKNOWN                       (-1765328213L)
3016 #define KRB5_RC_IO_SPACE                         (-1765328212L)
3017 #define KRB5_TRANS_CANTOPEN                      (-1765328211L)
3018 #define KRB5_TRANS_BADFORMAT                     (-1765328210L)
3019 #define KRB5_LNAME_CANTOPEN                      (-1765328209L)
3020 #define KRB5_LNAME_NOTRANS                       (-1765328208L)
3021 #define KRB5_LNAME_BADFORMAT                     (-1765328207L)
3022 #define KRB5_CRYPTO_INTERNAL                     (-1765328206L)
3023 #define KRB5_KT_BADNAME                          (-1765328205L)
3024 #define KRB5_KT_UNKNOWN_TYPE                     (-1765328204L)
3025 #define KRB5_KT_NOTFOUND                         (-1765328203L)
3026 #define KRB5_KT_END                              (-1765328202L)
3027 #define KRB5_KT_NOWRITE                          (-1765328201L)
3028 #define KRB5_KT_IOERR                            (-1765328200L)
3029 #define KRB5_NO_TKT_IN_RLM                       (-1765328199L)
3030 #define KRB5DES_BAD_KEYPAR                       (-1765328198L)
3031 #define KRB5DES_WEAK_KEY                         (-1765328197L)
3032 #define KRB5_BAD_ENCTYPE                         (-1765328196L)
3033 #define KRB5_BAD_KEYSIZE                         (-1765328195L)
3034 #define KRB5_BAD_MSIZE                           (-1765328194L)
3035 #define KRB5_CC_TYPE_EXISTS                      (-1765328193L)
3036 #define KRB5_KT_TYPE_EXISTS                      (-1765328192L)
3037 #define KRB5_CC_IO                               (-1765328191L)
3038 #define KRB5_FCC_PERM                            (-1765328190L)
3039 #define KRB5_FCC_NOFILE                          (-1765328189L)
3040 #define KRB5_FCC_INTERNAL                        (-1765328188L)
3041 #define KRB5_CC_WRITE                            (-1765328187L)
3042 #define KRB5_CC_NOMEM                            (-1765328186L)
3043 #define KRB5_CC_FORMAT                           (-1765328185L)
3044 #define KRB5_CC_NOT_KTYPE                        (-1765328184L)
3045 #define KRB5_INVALID_FLAGS                       (-1765328183L)
3046 #define KRB5_NO_2ND_TKT                          (-1765328182L)
3047 #define KRB5_NOCREDS_SUPPLIED                    (-1765328181L)
3048 #define KRB5_SENDAUTH_BADAUTHVERS                (-1765328180L)
3049 #define KRB5_SENDAUTH_BADAPPLVERS                (-1765328179L)
3050 #define KRB5_SENDAUTH_BADRESPONSE                (-1765328178L)
3051 #define KRB5_SENDAUTH_REJECTED                   (-1765328177L)
3052 #define KRB5_PREAUTH_BAD_TYPE                    (-1765328176L)
3053 #define KRB5_PREAUTH_NO_KEY                      (-1765328175L)
3054 #define KRB5_PREAUTH_FAILED                      (-1765328174L)
3055 #define KRB5_RCACHE_BADVNO                       (-1765328173L)
3056 #define KRB5_CCACHE_BADVNO                       (-1765328172L)
3057 #define KRB5_KEYTAB_BADVNO                       (-1765328171L)
3058 #define KRB5_PROG_ATYPE_NOSUPP                   (-1765328170L)
3059 #define KRB5_RC_REQUIRED                         (-1765328169L)
3060 #define KRB5_ERR_BAD_HOSTNAME                    (-1765328168L)
3061 #define KRB5_ERR_HOST_REALM_UNKNOWN              (-1765328167L)
3062 #define KRB5_SNAME_UNSUPP_NAMETYPE               (-1765328166L)
3063 #define KRB5KRB_AP_ERR_V4_REPLY                  (-1765328165L)
3064 #define KRB5_REALM_CANT_RESOLVE                  (-1765328164L)
3065 #define KRB5_TKT_NOT_FORWARDABLE                 (-1765328163L)
3066 #define KRB5_FWD_BAD_PRINCIPAL                   (-1765328162L)
3067 #define KRB5_GET_IN_TKT_LOOP                     (-1765328161L)
3068 #define KRB5_CONFIG_NODEFREALM                   (-1765328160L)
3069 #define KRB5_SAM_UNSUPPORTED                     (-1765328159L)
3070 #define KRB5_SAM_INVALID_ETYPE                   (-1765328158L)
3071 #define KRB5_SAM_NO_CHECKSUM                     (-1765328157L)
3072 #define KRB5_SAM_BAD_CHECKSUM                    (-1765328156L)
3073 #define KRB5_KT_NAME_TOOLONG                     (-1765328155L)
3074 #define KRB5_KT_KVNONOTFOUND                     (-1765328154L)
3075 #define KRB5_APPL_EXPIRED                        (-1765328153L)
3076 #define KRB5_LIB_EXPIRED                         (-1765328152L)
3077 #define KRB5_CHPW_PWDNULL                        (-1765328151L)
3078 #define KRB5_CHPW_FAIL                           (-1765328150L)
3079 #define KRB5_KT_FORMAT                           (-1765328149L)
3080 #define KRB5_NOPERM_ETYPE                        (-1765328148L)
3081 #define KRB5_CONFIG_ETYPE_NOSUPP                 (-1765328147L)
3082 #define KRB5_OBSOLETE_FN                         (-1765328146L)
3083 #define KRB5_EAI_FAIL                            (-1765328145L)
3084 #define KRB5_EAI_NODATA                          (-1765328144L)
3085 #define KRB5_EAI_NONAME                          (-1765328143L)
3086 #define KRB5_EAI_SERVICE                         (-1765328142L)
3087 #define KRB5_ERR_NUMERIC_REALM                   (-1765328141L)
3088 #define KRB5_ERR_BAD_S2K_PARAMS                  (-1765328140L)
3089 #define KRB5_ERR_NO_SERVICE                      (-1765328139L)
3090 #define KRB5_CC_READONLY                         (-1765328138L)
3091 #define KRB5_CC_NOSUPP                           (-1765328137L)
3092 
3093 /* NOTE! error values should not collide */
3094 /* XXX Note KRB5_RC_BADNAME and KRB5_CONF_NOT_CONFIGURED are Solaris specific */
3095 #define	KRB5_RC_BADNAME				(-1765328136L)
3096 #define	KRB5_CONF_NOT_CONFIGURED	 	 (-1765328135L)
3097 #ifdef _KERNEL
3098 /* XXX Note KRB5_KEF_ERROR and PKCS_ERR are Solaris specific */
3099 #define KRB5_KEF_ERROR                           (-1765328134L)
3100 #else
3101 #define PKCS_ERR				 (-1765328134L)
3102 #endif /* _KERNEL */
3103 
3104 #define KRB5_DELTAT_BADFORMAT			(-1765328133L)
3105 #define KRB5_PLUGIN_NO_HANDLE			(-1765328132L)
3106 #define KRB5_PLUGIN_OP_NOTSUPP			(-1765328131L)
3107 
3108 #define ERROR_TABLE_BASE_krb5 (-1765328384L)
3109 
3110 /* for compatibility with older versions... */
3111 #define krb5_err_base ERROR_TABLE_BASE_krb5
3112 /*
3113  * kdb5_err.h:
3114  * This file is automatically generated; please do not edit it.
3115  */
3116 #define KRB5_KDB_RCSID                           (-1780008448L)
3117 #define KRB5_KDB_INUSE                           (-1780008447L)
3118 #define KRB5_KDB_UK_SERROR                       (-1780008446L)
3119 #define KRB5_KDB_UK_RERROR                       (-1780008445L)
3120 #define KRB5_KDB_UNAUTH                          (-1780008444L)
3121 #define KRB5_KDB_NOENTRY                         (-1780008443L)
3122 #define KRB5_KDB_ILL_WILDCARD                    (-1780008442L)
3123 #define KRB5_KDB_DB_INUSE                        (-1780008441L)
3124 #define KRB5_KDB_DB_CHANGED                      (-1780008440L)
3125 #define KRB5_KDB_TRUNCATED_RECORD                (-1780008439L)
3126 #define KRB5_KDB_RECURSIVELOCK                   (-1780008438L)
3127 #define KRB5_KDB_NOTLOCKED                       (-1780008437L)
3128 #define KRB5_KDB_BADLOCKMODE                     (-1780008436L)
3129 #define KRB5_KDB_DBNOTINITED                     (-1780008435L)
3130 #define KRB5_KDB_DBINITED                        (-1780008434L)
3131 #define KRB5_KDB_ILLDIRECTION                    (-1780008433L)
3132 #define KRB5_KDB_NOMASTERKEY                     (-1780008432L)
3133 #define KRB5_KDB_BADMASTERKEY                    (-1780008431L)
3134 #define KRB5_KDB_INVALIDKEYSIZE                  (-1780008430L)
3135 #define KRB5_KDB_CANTREAD_STORED                 (-1780008429L)
3136 #define KRB5_KDB_BADSTORED_MKEY                  (-1780008428L)
3137 #define KRB5_KDB_CANTLOCK_DB                     (-1780008427L)
3138 #define KRB5_KDB_DB_CORRUPT                      (-1780008426L)
3139 #define KRB5_KDB_BAD_VERSION                     (-1780008425L)
3140 #define KRB5_KDB_BAD_SALTTYPE                    (-1780008424L)
3141 #define KRB5_KDB_BAD_ENCTYPE                     (-1780008423L)
3142 #define KRB5_KDB_BAD_CREATEFLAGS                 (-1780008422L)
3143 #define KRB5_KDB_NO_PERMITTED_KEY                (-1780008421L)
3144 #define KRB5_KDB_NO_MATCHING_KEY                 (-1780008420L)
3145 /*
3146  * Incremental propagation error codes
3147  */
3148 #define	KRB5_LOG_CONV				(-1780008419L)
3149 #define	KRB5_LOG_UNSTABLE			(-1780008418L)
3150 #define	KRB5_LOG_CORRUPT			(-1780008417L)
3151 #define	KRB5_LOG_ERROR				(-1780008416L)
3152 #define KRB5_KDB_DBTYPE_NOTFOUND		(-1780008415L)
3153 #define KRB5_KDB_DBTYPE_NOSUP			(-1780008414L)
3154 #define KRB5_KDB_DBTYPE_INIT			(-1780008413L)
3155 #define KRB5_KDB_SERVER_INTERNAL_ERR		(-1780008412L)
3156 #define KRB5_KDB_ACCESS_ERROR			(-1780008411L)
3157 #define KRB5_KDB_INTERNAL_ERROR			(-1780008410L)
3158 #define KRB5_KDB_CONSTRAINT_VIOLATION		(-1780008409L)
3159 #define ERROR_TABLE_BASE_kdb5 (-1780008448L)
3160 
3161 /* for compatibility with older versions... */
3162 #define kdb5_err_base ERROR_TABLE_BASE_kdb5
3163 /*
3164  * kv5m_err.h:
3165  * This file is automatically generated; please do not edit it.
3166  */
3167 #define KV5M_NONE                                (-1760647424L)
3168 #define KV5M_PRINCIPAL                           (-1760647423L)
3169 #define KV5M_DATA                                (-1760647422L)
3170 #define KV5M_KEYBLOCK                            (-1760647421L)
3171 #define KV5M_CHECKSUM                            (-1760647420L)
3172 #define KV5M_ENCRYPT_BLOCK                       (-1760647419L)
3173 #define KV5M_ENC_DATA                            (-1760647418L)
3174 #define KV5M_CRYPTOSYSTEM_ENTRY                  (-1760647417L)
3175 #define KV5M_CS_TABLE_ENTRY                      (-1760647416L)
3176 #define KV5M_CHECKSUM_ENTRY                      (-1760647415L)
3177 #define KV5M_AUTHDATA                            (-1760647414L)
3178 #define KV5M_TRANSITED                           (-1760647413L)
3179 #define KV5M_ENC_TKT_PART                        (-1760647412L)
3180 #define KV5M_TICKET                              (-1760647411L)
3181 #define KV5M_AUTHENTICATOR                       (-1760647410L)
3182 #define KV5M_TKT_AUTHENT                         (-1760647409L)
3183 #define KV5M_CREDS                               (-1760647408L)
3184 #define KV5M_LAST_REQ_ENTRY                      (-1760647407L)
3185 #define KV5M_PA_DATA                             (-1760647406L)
3186 #define KV5M_KDC_REQ                             (-1760647405L)
3187 #define KV5M_ENC_KDC_REP_PART                    (-1760647404L)
3188 #define KV5M_KDC_REP                             (-1760647403L)
3189 #define KV5M_ERROR                               (-1760647402L)
3190 #define KV5M_AP_REQ                              (-1760647401L)
3191 #define KV5M_AP_REP                              (-1760647400L)
3192 #define KV5M_AP_REP_ENC_PART                     (-1760647399L)
3193 #define KV5M_RESPONSE                            (-1760647398L)
3194 #define KV5M_SAFE                                (-1760647397L)
3195 #define KV5M_PRIV                                (-1760647396L)
3196 #define KV5M_PRIV_ENC_PART                       (-1760647395L)
3197 #define KV5M_CRED                                (-1760647394L)
3198 #define KV5M_CRED_INFO                           (-1760647393L)
3199 #define KV5M_CRED_ENC_PART                       (-1760647392L)
3200 #define KV5M_PWD_DATA                            (-1760647391L)
3201 #define KV5M_ADDRESS                             (-1760647390L)
3202 #define KV5M_KEYTAB_ENTRY                        (-1760647389L)
3203 #define KV5M_CONTEXT                             (-1760647388L)
3204 #define KV5M_OS_CONTEXT                          (-1760647387L)
3205 #define KV5M_ALT_METHOD                          (-1760647386L)
3206 #define KV5M_ETYPE_INFO_ENTRY                    (-1760647385L)
3207 #define KV5M_DB_CONTEXT                          (-1760647384L)
3208 #define KV5M_AUTH_CONTEXT                        (-1760647383L)
3209 #define KV5M_KEYTAB                              (-1760647382L)
3210 #define KV5M_RCACHE                              (-1760647381L)
3211 #define KV5M_CCACHE                              (-1760647380L)
3212 #define KV5M_PREAUTH_OPS                         (-1760647379L)
3213 #define KV5M_SAM_CHALLENGE                       (-1760647378L)
3214 #define KV5M_SAM_KEY                             (-1760647377L)
3215 #define KV5M_ENC_SAM_RESPONSE_ENC                (-1760647376L)
3216 #define KV5M_ENC_SAM_RESPONSE_ENC_2              (-1760647374L)
3217 #define KV5M_SAM_RESPONSE                        (-1760647373L)
3218 #define KV5M_SAM_RESPONSE_2                      (-1760647372L)
3219 #define KV5M_PREDICTED_SAM_RESPONSE              (-1760647371L)
3220 #define KV5M_PASSWD_PHRASE_ELEMENT               (-1760647370L)
3221 #define KV5M_GSS_OID                             (-1760647369L)
3222 #define KV5M_GSS_QUEUE                           (-1760647368L)
3223 #define ERROR_TABLE_BASE_kv5m (-1760647424L)
3224 
3225 /* for compatibility with older versions... */
3226 #define kv5m_err_base ERROR_TABLE_BASE_kv5m
3227 /*
3228  * asn1_err.h:
3229  * This file is automatically generated; please do not edit it.
3230  */
3231 #define ASN1_BAD_TIMEFORMAT                      (1859794432L)
3232 #define ASN1_MISSING_FIELD                       (1859794433L)
3233 #define ASN1_MISPLACED_FIELD                     (1859794434L)
3234 #define ASN1_TYPE_MISMATCH                       (1859794435L)
3235 #define ASN1_OVERFLOW                            (1859794436L)
3236 #define ASN1_OVERRUN                             (1859794437L)
3237 #define ASN1_BAD_ID                              (1859794438L)
3238 #define ASN1_BAD_LENGTH                          (1859794439L)
3239 #define ASN1_BAD_FORMAT                          (1859794440L)
3240 #define ASN1_PARSE_ERROR                         (1859794441L)
3241 #define ASN1_BAD_GMTIME                          (1859794442L)
3242 #define ASN1_MISMATCH_INDEF			 (1859794443L)
3243 #define ASN1_MISSING_EOC			 (1859794444L)
3244 #define ERROR_TABLE_BASE_asn1 (1859794432L)
3245 
3246 /* for compatibility with older versions... */
3247 #define asn1_err_base ERROR_TABLE_BASE_asn1
3248 
3249 #ifdef __cplusplus
3250 }
3251 #endif
3252 
3253 #endif		/* _KRB5_H */
3254