1 /*
2 * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
3 * Use is subject to license terms.
4 */
5
6 /*
7 * Copyright (C) 1989-1995 by the Massachusetts Institute of Technology,
8 * Cambridge, MA, USA. All Rights Reserved.
9 *
10 * This software is being provided to you, the LICENSEE, by the
11 * Massachusetts Institute of Technology (M.I.T.) under the following
12 * license. By obtaining, using and/or copying this software, you agree
13 * that you have read, understood, and will comply with these terms and
14 * conditions:
15 *
16 * Export of this software from the United States of America may
17 * require a specific license from the United States Government.
18 * It is the responsibility of any person or organization contemplating
19 * export to obtain such a license before exporting.
20 *
21 * WITHIN THAT CONSTRAINT, permission to use, copy, modify and distribute
22 * this software and its documentation for any purpose and without fee or
60 * this software for any purpose. It is provided "as is" without express
61 * or implied warranty.
62 *
63 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
64 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
65 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
66 */
67
68 /*
69 * This prototype for k5-int.h (Krb5 internals include file)
70 * includes the user-visible definitions from krb5.h and then
71 * includes other definitions that are not user-visible but are
72 * required for compiling Kerberos internal routines.
73 *
74 * John Gilmore, Cygnus Support, Sat Jan 21 22:45:52 PST 1995
75 */
76
77 #ifndef _KRB5_INT_H
78 #define _KRB5_INT_H
79
80 #pragma ident "@(#)k5-int.h 1.18 04/09/08 SMI"
81
82 #ifndef _KERNEL
83 #include <osconf.h>
84 #include <security/cryptoki.h>
85 #else
86 #include <sys/crypto/common.h>
87 #include <sys/crypto/api.h>
88 #endif
89
90 #ifdef DEBUG
91 #if !defined(KRB5_DEBUG)
92 #define KRB5_DEBUG
93 #endif
94 #ifndef KRB5_LOG_LVL
95 #define KRB5_LOG_LVL KRB5_ERR
96 #endif
97 #endif /* DEBUG */
98
99 #ifdef _KERNEL
100
1194 CK_OBJECT_HANDLE dKey; /* decrype key object */
1195 uchar_t initialized;
1196 }arcfour_ctx_rec;
1197
1198 #endif /* !_KERNEL */
1199
1200 struct _krb5_context {
1201 krb5_magic magic;
1202 krb5_enctype *in_tkt_ktypes;
1203 int in_tkt_ktype_count;
1204 krb5_enctype *tgs_ktypes;
1205 int tgs_ktype_count;
1206 void *os_context;
1207 char *default_realm;
1208 int ser_ctx_count;
1209 krb5_boolean profile_secure;
1210 void *ser_ctx;
1211 #ifndef _KERNEL
1212 profile_t profile;
1213 void *db_context;
1214 /* allowable clock skew */
1215 krb5_deltat clockskew;
1216 krb5_cksumtype kdc_req_sumtype;
1217 krb5_cksumtype default_ap_req_sumtype;
1218 krb5_cksumtype default_safe_sumtype;
1219 krb5_flags kdc_default_options;
1220 krb5_flags library_options;
1221 int fcc_default_format;
1222 int scc_default_format;
1223 krb5_prompt_type *prompt_types;
1224 /* Message size above which we'll try TCP first in send-to-kdc
1225 type code. Aside from the 2**16 size limit, we put no
1226 absolute limit on the UDP packet size. */
1227 int udp_pref_limit;
1228
1229 /* This is the tgs_ktypes list as read from the profile, or
1230 set to compiled-in defaults. The application code cannot
1231 override it. This is used for session keys for
1232 intermediate ticket-granting tickets used to acquire the
1233 requested ticket (the session key of which may be
|
1 /*
2 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
3 * Use is subject to license terms.
4 */
5
6 /*
7 * Copyright (C) 1989-1995 by the Massachusetts Institute of Technology,
8 * Cambridge, MA, USA. All Rights Reserved.
9 *
10 * This software is being provided to you, the LICENSEE, by the
11 * Massachusetts Institute of Technology (M.I.T.) under the following
12 * license. By obtaining, using and/or copying this software, you agree
13 * that you have read, understood, and will comply with these terms and
14 * conditions:
15 *
16 * Export of this software from the United States of America may
17 * require a specific license from the United States Government.
18 * It is the responsibility of any person or organization contemplating
19 * export to obtain such a license before exporting.
20 *
21 * WITHIN THAT CONSTRAINT, permission to use, copy, modify and distribute
22 * this software and its documentation for any purpose and without fee or
60 * this software for any purpose. It is provided "as is" without express
61 * or implied warranty.
62 *
63 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
64 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
65 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
66 */
67
68 /*
69 * This prototype for k5-int.h (Krb5 internals include file)
70 * includes the user-visible definitions from krb5.h and then
71 * includes other definitions that are not user-visible but are
72 * required for compiling Kerberos internal routines.
73 *
74 * John Gilmore, Cygnus Support, Sat Jan 21 22:45:52 PST 1995
75 */
76
77 #ifndef _KRB5_INT_H
78 #define _KRB5_INT_H
79
80 #pragma ident "@(#)k5-int.h 1.17 04/05/04 SMI"
81
82 #ifndef _KERNEL
83 #include <osconf.h>
84 #include <security/cryptoki.h>
85 #else
86 #include <sys/crypto/common.h>
87 #include <sys/crypto/api.h>
88 #endif
89
90 #ifdef DEBUG
91 #if !defined(KRB5_DEBUG)
92 #define KRB5_DEBUG
93 #endif
94 #ifndef KRB5_LOG_LVL
95 #define KRB5_LOG_LVL KRB5_ERR
96 #endif
97 #endif /* DEBUG */
98
99 #ifdef _KERNEL
100
1194 CK_OBJECT_HANDLE dKey; /* decrype key object */
1195 uchar_t initialized;
1196 }arcfour_ctx_rec;
1197
1198 #endif /* !_KERNEL */
1199
1200 struct _krb5_context {
1201 krb5_magic magic;
1202 krb5_enctype *in_tkt_ktypes;
1203 int in_tkt_ktype_count;
1204 krb5_enctype *tgs_ktypes;
1205 int tgs_ktype_count;
1206 void *os_context;
1207 char *default_realm;
1208 int ser_ctx_count;
1209 krb5_boolean profile_secure;
1210 void *ser_ctx;
1211 #ifndef _KERNEL
1212 profile_t profile;
1213 void *db_context;
1214 void *kdblog_context;
1215 /* allowable clock skew */
1216 krb5_deltat clockskew;
1217 krb5_cksumtype kdc_req_sumtype;
1218 krb5_cksumtype default_ap_req_sumtype;
1219 krb5_cksumtype default_safe_sumtype;
1220 krb5_flags kdc_default_options;
1221 krb5_flags library_options;
1222 int fcc_default_format;
1223 int scc_default_format;
1224 krb5_prompt_type *prompt_types;
1225 /* Message size above which we'll try TCP first in send-to-kdc
1226 type code. Aside from the 2**16 size limit, we put no
1227 absolute limit on the UDP packet size. */
1228 int udp_pref_limit;
1229
1230 /* This is the tgs_ktypes list as read from the profile, or
1231 set to compiled-in defaults. The application code cannot
1232 override it. This is used for session keys for
1233 intermediate ticket-granting tickets used to acquire the
1234 requested ticket (the session key of which may be
|