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