xref: /minix3/crypto/external/bsd/heimdal/dist/lib/krb5/krb5_locl.h (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc /*	$NetBSD: krb5_locl.h,v 1.1.1.3 2014/04/24 12:45:50 pettai Exp $	*/
2ebfedea0SLionel Sambuc 
3ebfedea0SLionel Sambuc /*
4ebfedea0SLionel Sambuc  * Copyright (c) 1997-2006 Kungliga Tekniska Högskolan
5ebfedea0SLionel Sambuc  * (Royal Institute of Technology, Stockholm, Sweden).
6ebfedea0SLionel Sambuc  * All rights reserved.
7ebfedea0SLionel Sambuc  *
8ebfedea0SLionel Sambuc  * Portions Copyright (c) 2009 Apple Inc. All rights reserved.
9ebfedea0SLionel Sambuc  *
10ebfedea0SLionel Sambuc  * Redistribution and use in source and binary forms, with or without
11ebfedea0SLionel Sambuc  * modification, are permitted provided that the following conditions
12ebfedea0SLionel Sambuc  * are met:
13ebfedea0SLionel Sambuc  *
14ebfedea0SLionel Sambuc  * 1. Redistributions of source code must retain the above copyright
15ebfedea0SLionel Sambuc  *    notice, this list of conditions and the following disclaimer.
16ebfedea0SLionel Sambuc  *
17ebfedea0SLionel Sambuc  * 2. Redistributions in binary form must reproduce the above copyright
18ebfedea0SLionel Sambuc  *    notice, this list of conditions and the following disclaimer in the
19ebfedea0SLionel Sambuc  *    documentation and/or other materials provided with the distribution.
20ebfedea0SLionel Sambuc  *
21ebfedea0SLionel Sambuc  * 3. Neither the name of the Institute nor the names of its contributors
22ebfedea0SLionel Sambuc  *    may be used to endorse or promote products derived from this software
23ebfedea0SLionel Sambuc  *    without specific prior written permission.
24ebfedea0SLionel Sambuc  *
25ebfedea0SLionel Sambuc  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
26ebfedea0SLionel Sambuc  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27ebfedea0SLionel Sambuc  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28ebfedea0SLionel Sambuc  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
29ebfedea0SLionel Sambuc  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30ebfedea0SLionel Sambuc  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31ebfedea0SLionel Sambuc  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32ebfedea0SLionel Sambuc  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33ebfedea0SLionel Sambuc  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34ebfedea0SLionel Sambuc  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35ebfedea0SLionel Sambuc  * SUCH DAMAGE.
36ebfedea0SLionel Sambuc  */
37ebfedea0SLionel Sambuc 
38ebfedea0SLionel Sambuc /* Id */
39ebfedea0SLionel Sambuc 
40ebfedea0SLionel Sambuc #ifndef __KRB5_LOCL_H__
41ebfedea0SLionel Sambuc #define __KRB5_LOCL_H__
42ebfedea0SLionel Sambuc 
43ebfedea0SLionel Sambuc #include <config.h>
44ebfedea0SLionel Sambuc 
45ebfedea0SLionel Sambuc #include <errno.h>
46ebfedea0SLionel Sambuc #include <ctype.h>
47ebfedea0SLionel Sambuc #include <string.h>
48ebfedea0SLionel Sambuc #include <stdio.h>
49ebfedea0SLionel Sambuc #include <stdlib.h>
50ebfedea0SLionel Sambuc #include <limits.h>
51ebfedea0SLionel Sambuc 
52*0a6a1f1dSLionel Sambuc #ifdef HAVE_POLL_H
53*0a6a1f1dSLionel Sambuc #include <sys/poll.h>
54*0a6a1f1dSLionel Sambuc #endif
55*0a6a1f1dSLionel Sambuc 
56ebfedea0SLionel Sambuc #include <krb5/krb5-types.h>
57ebfedea0SLionel Sambuc 
58ebfedea0SLionel Sambuc #ifdef HAVE_SYS_TYPES_H
59ebfedea0SLionel Sambuc #include <sys/types.h>
60ebfedea0SLionel Sambuc #endif
61ebfedea0SLionel Sambuc #ifdef HAVE_SYS_MMAN_H
62ebfedea0SLionel Sambuc #include <sys/mman.h>
63ebfedea0SLionel Sambuc #endif
64ebfedea0SLionel Sambuc #ifdef HAVE_UNISTD_H
65ebfedea0SLionel Sambuc #include <unistd.h>
66ebfedea0SLionel Sambuc #endif
67ebfedea0SLionel Sambuc #ifdef HAVE_FCNTL_H
68ebfedea0SLionel Sambuc #include <fcntl.h>
69ebfedea0SLionel Sambuc #endif
70ebfedea0SLionel Sambuc 
71ebfedea0SLionel Sambuc #if defined(HAVE_SYS_IOCTL_H) && SunOS != 40
72ebfedea0SLionel Sambuc #include <sys/ioctl.h>
73ebfedea0SLionel Sambuc #endif
74ebfedea0SLionel Sambuc #ifdef HAVE_PWD_H
75ebfedea0SLionel Sambuc #undef _POSIX_PTHREAD_SEMANTICS
76ebfedea0SLionel Sambuc /* This gets us the 5-arg getpwnam_r on Solaris 9.  */
77ebfedea0SLionel Sambuc #define _POSIX_PTHREAD_SEMANTICS
78ebfedea0SLionel Sambuc #include <pwd.h>
79ebfedea0SLionel Sambuc #endif
80ebfedea0SLionel Sambuc 
81ebfedea0SLionel Sambuc #ifdef HAVE_SYS_PARAM_H
82ebfedea0SLionel Sambuc #include <sys/param.h>
83ebfedea0SLionel Sambuc #endif
84ebfedea0SLionel Sambuc #include <time.h>
85ebfedea0SLionel Sambuc #ifdef HAVE_SYS_TIME_H
86ebfedea0SLionel Sambuc #include <sys/time.h>
87ebfedea0SLionel Sambuc #endif
88ebfedea0SLionel Sambuc #ifdef HAVE_SYS_SELECT_H
89ebfedea0SLionel Sambuc #include <sys/select.h>
90ebfedea0SLionel Sambuc #endif
91ebfedea0SLionel Sambuc #ifdef HAVE_SYS_SOCKET_H
92ebfedea0SLionel Sambuc #include <sys/socket.h>
93ebfedea0SLionel Sambuc #endif
94ebfedea0SLionel Sambuc #ifdef HAVE_NETINET_IN_H
95ebfedea0SLionel Sambuc #include <netinet/in.h>
96ebfedea0SLionel Sambuc #endif
97ebfedea0SLionel Sambuc #ifdef HAVE_NETINET_IN6_H
98ebfedea0SLionel Sambuc #include <netinet/in6.h>
99ebfedea0SLionel Sambuc #endif
100ebfedea0SLionel Sambuc #ifdef HAVE_NETINET6_IN6_H
101ebfedea0SLionel Sambuc #include <netinet6/in6.h>
102ebfedea0SLionel Sambuc #endif
103ebfedea0SLionel Sambuc #ifdef HAVE_NETDB_H
104ebfedea0SLionel Sambuc #include <netdb.h>
105ebfedea0SLionel Sambuc #endif
106ebfedea0SLionel Sambuc #ifdef _AIX
107ebfedea0SLionel Sambuc struct ether_addr;
108ebfedea0SLionel Sambuc struct mbuf;
109ebfedea0SLionel Sambuc struct sockaddr_dl;
110ebfedea0SLionel Sambuc #endif
111ebfedea0SLionel Sambuc #ifdef HAVE_ARPA_INET_H
112ebfedea0SLionel Sambuc #include <arpa/inet.h>
113ebfedea0SLionel Sambuc #endif
114ebfedea0SLionel Sambuc #ifdef HAVE_ARPA_NAMESER_H
115ebfedea0SLionel Sambuc #include <arpa/nameser.h>
116ebfedea0SLionel Sambuc #endif
117ebfedea0SLionel Sambuc #ifdef HAVE_SYS_UIO_H
118ebfedea0SLionel Sambuc #include <sys/uio.h>
119ebfedea0SLionel Sambuc #endif
120ebfedea0SLionel Sambuc #ifdef HAVE_SYS_FILIO_H
121ebfedea0SLionel Sambuc #include <sys/filio.h>
122ebfedea0SLionel Sambuc #endif
123ebfedea0SLionel Sambuc #ifdef HAVE_SYS_FILE_H
124ebfedea0SLionel Sambuc #include <sys/file.h>
125ebfedea0SLionel Sambuc #endif
126ebfedea0SLionel Sambuc 
127ebfedea0SLionel Sambuc #include <krb5/com_err.h>
128ebfedea0SLionel Sambuc 
129ebfedea0SLionel Sambuc #include <krb5/heimbase.h>
130ebfedea0SLionel Sambuc 
131ebfedea0SLionel Sambuc #define HEIMDAL_TEXTDOMAIN "heimdal_krb5"
132ebfedea0SLionel Sambuc 
133ebfedea0SLionel Sambuc #ifdef LIBINTL
134ebfedea0SLionel Sambuc #include <libintl.h>
135ebfedea0SLionel Sambuc #define N_(x,y) dgettext(HEIMDAL_TEXTDOMAIN, x)
136ebfedea0SLionel Sambuc #else
137ebfedea0SLionel Sambuc #define N_(x,y) (x)
138ebfedea0SLionel Sambuc #define bindtextdomain(package, localedir)
139ebfedea0SLionel Sambuc #endif
140ebfedea0SLionel Sambuc 
141ebfedea0SLionel Sambuc 
142ebfedea0SLionel Sambuc #ifdef HAVE_CRYPT_H
143ebfedea0SLionel Sambuc #undef des_encrypt
144ebfedea0SLionel Sambuc #define des_encrypt wingless_pigs_mostly_fail_to_fly
145ebfedea0SLionel Sambuc #include <crypt.h>
146ebfedea0SLionel Sambuc #undef des_encrypt
147ebfedea0SLionel Sambuc #endif
148ebfedea0SLionel Sambuc 
149ebfedea0SLionel Sambuc #ifdef HAVE_DOOR_CREATE
150ebfedea0SLionel Sambuc #include <door.h>
151ebfedea0SLionel Sambuc #endif
152ebfedea0SLionel Sambuc 
153ebfedea0SLionel Sambuc #include <krb5/roken.h>
154ebfedea0SLionel Sambuc #include <krb5/parse_time.h>
155ebfedea0SLionel Sambuc #include <krb5/base64.h>
156ebfedea0SLionel Sambuc 
157ebfedea0SLionel Sambuc #include <krb5/wind.h>
158ebfedea0SLionel Sambuc 
159ebfedea0SLionel Sambuc #define HC_DEPRECATED_CRYPTO
160ebfedea0SLionel Sambuc #include "crypto-headers.h"
161ebfedea0SLionel Sambuc 
162ebfedea0SLionel Sambuc 
163ebfedea0SLionel Sambuc #include <krb5/krb5_asn1.h>
164ebfedea0SLionel Sambuc 
165ebfedea0SLionel Sambuc struct send_to_kdc;
166ebfedea0SLionel Sambuc 
167ebfedea0SLionel Sambuc /* XXX glue for pkinit */
168ebfedea0SLionel Sambuc struct hx509_certs_data;
169ebfedea0SLionel Sambuc struct krb5_pk_identity;
170ebfedea0SLionel Sambuc struct krb5_pk_cert;
171ebfedea0SLionel Sambuc struct ContentInfo;
172ebfedea0SLionel Sambuc struct AlgorithmIdentifier;
173ebfedea0SLionel Sambuc typedef struct krb5_pk_init_ctx_data *krb5_pk_init_ctx;
174ebfedea0SLionel Sambuc struct krb5_dh_moduli;
175ebfedea0SLionel Sambuc 
176ebfedea0SLionel Sambuc /* v4 glue */
177ebfedea0SLionel Sambuc struct _krb5_krb_auth_data;
178ebfedea0SLionel Sambuc 
179ebfedea0SLionel Sambuc #include <krb5/der.h>
180ebfedea0SLionel Sambuc 
181ebfedea0SLionel Sambuc #include <krb5/krb5.h>
182ebfedea0SLionel Sambuc #include <krb5/krb5_err.h>
183ebfedea0SLionel Sambuc #include <krb5/asn1_err.h>
184ebfedea0SLionel Sambuc #ifdef PKINIT
185ebfedea0SLionel Sambuc #include <krb5/hx509.h>
186ebfedea0SLionel Sambuc #endif
187ebfedea0SLionel Sambuc 
188ebfedea0SLionel Sambuc #include "crypto.h"
189ebfedea0SLionel Sambuc 
190ebfedea0SLionel Sambuc #include <krb5/krb5-private.h>
191ebfedea0SLionel Sambuc 
192ebfedea0SLionel Sambuc #include "heim_threads.h"
193ebfedea0SLionel Sambuc 
194ebfedea0SLionel Sambuc #define ALLOC(X, N) (X) = calloc((N), sizeof(*(X)))
195ebfedea0SLionel Sambuc #define ALLOC_SEQ(X, N) do { (X)->len = (N); ALLOC((X)->val, (N)); } while(0)
196ebfedea0SLionel Sambuc 
197*0a6a1f1dSLionel Sambuc #ifndef __func__
198*0a6a1f1dSLionel Sambuc #define __func__ "unknown-function"
199*0a6a1f1dSLionel Sambuc #endif
200*0a6a1f1dSLionel Sambuc 
201*0a6a1f1dSLionel Sambuc #define krb5_einval(context, argnum) _krb5_einval((context), __func__, (argnum))
202*0a6a1f1dSLionel Sambuc 
203ebfedea0SLionel Sambuc #ifndef PATH_SEP
204ebfedea0SLionel Sambuc #define PATH_SEP ":"
205ebfedea0SLionel Sambuc #endif
206ebfedea0SLionel Sambuc 
207ebfedea0SLionel Sambuc /* should this be public? */
208ebfedea0SLionel Sambuc #define KEYTAB_DEFAULT "FILE:" SYSCONFDIR "/krb5.keytab"
209ebfedea0SLionel Sambuc #define KEYTAB_DEFAULT_MODIFY "FILE:" SYSCONFDIR "/krb5.keytab"
210ebfedea0SLionel Sambuc 
211ebfedea0SLionel Sambuc 
212ebfedea0SLionel Sambuc #define MODULI_FILE SYSCONFDIR "/krb5.moduli"
213ebfedea0SLionel Sambuc 
214ebfedea0SLionel Sambuc #ifndef O_BINARY
215ebfedea0SLionel Sambuc #define O_BINARY 0
216ebfedea0SLionel Sambuc #endif
217ebfedea0SLionel Sambuc 
218ebfedea0SLionel Sambuc #ifndef O_CLOEXEC
219ebfedea0SLionel Sambuc #define O_CLOEXEC 0
220ebfedea0SLionel Sambuc #endif
221ebfedea0SLionel Sambuc 
222ebfedea0SLionel Sambuc #ifndef SOCK_CLOEXEC
223ebfedea0SLionel Sambuc #define SOCK_CLOEXEC 0
224ebfedea0SLionel Sambuc #endif
225ebfedea0SLionel Sambuc 
226ebfedea0SLionel Sambuc 
227ebfedea0SLionel Sambuc #define KRB5_BUFSIZ 2048
228ebfedea0SLionel Sambuc 
229ebfedea0SLionel Sambuc typedef enum {
230ebfedea0SLionel Sambuc     KRB5_INIT_CREDS_TRISTATE_UNSET = 0,
231ebfedea0SLionel Sambuc     KRB5_INIT_CREDS_TRISTATE_TRUE,
232ebfedea0SLionel Sambuc     KRB5_INIT_CREDS_TRISTATE_FALSE
233ebfedea0SLionel Sambuc } krb5_get_init_creds_tristate;
234ebfedea0SLionel Sambuc 
235ebfedea0SLionel Sambuc struct _krb5_get_init_creds_opt_private {
236ebfedea0SLionel Sambuc     int refcount;
237ebfedea0SLionel Sambuc     /* ENC_TIMESTAMP */
238ebfedea0SLionel Sambuc     const char *password;
239ebfedea0SLionel Sambuc     krb5_s2k_proc key_proc;
240ebfedea0SLionel Sambuc     /* PA_PAC_REQUEST */
241ebfedea0SLionel Sambuc     krb5_get_init_creds_tristate req_pac;
242ebfedea0SLionel Sambuc     /* PKINIT */
243ebfedea0SLionel Sambuc     krb5_pk_init_ctx pk_init_ctx;
244ebfedea0SLionel Sambuc     krb5_get_init_creds_tristate addressless;
245ebfedea0SLionel Sambuc     int flags;
246ebfedea0SLionel Sambuc #define KRB5_INIT_CREDS_CANONICALIZE		1
247ebfedea0SLionel Sambuc #define KRB5_INIT_CREDS_NO_C_CANON_CHECK	2
248ebfedea0SLionel Sambuc #define KRB5_INIT_CREDS_NO_C_NO_EKU_CHECK	4
249ebfedea0SLionel Sambuc     struct {
250ebfedea0SLionel Sambuc         krb5_gic_process_last_req func;
251ebfedea0SLionel Sambuc         void *ctx;
252ebfedea0SLionel Sambuc     } lr;
253ebfedea0SLionel Sambuc };
254ebfedea0SLionel Sambuc 
255*0a6a1f1dSLionel Sambuc typedef uint32_t krb5_enctype_set;
256*0a6a1f1dSLionel Sambuc 
257ebfedea0SLionel Sambuc typedef struct krb5_context_data {
258ebfedea0SLionel Sambuc     krb5_enctype *etypes;
259*0a6a1f1dSLionel Sambuc     krb5_enctype *etypes_des;/* deprecated */
260*0a6a1f1dSLionel Sambuc     krb5_enctype *as_etypes;
261*0a6a1f1dSLionel Sambuc     krb5_enctype *tgs_etypes;
262*0a6a1f1dSLionel Sambuc     krb5_enctype *permitted_enctypes;
263ebfedea0SLionel Sambuc     char **default_realms;
264ebfedea0SLionel Sambuc     time_t max_skew;
265ebfedea0SLionel Sambuc     time_t kdc_timeout;
266ebfedea0SLionel Sambuc     unsigned max_retries;
267ebfedea0SLionel Sambuc     int32_t kdc_sec_offset;
268ebfedea0SLionel Sambuc     int32_t kdc_usec_offset;
269ebfedea0SLionel Sambuc     krb5_config_section *cf;
270ebfedea0SLionel Sambuc     struct et_list *et_list;
271ebfedea0SLionel Sambuc     struct krb5_log_facility *warn_dest;
272ebfedea0SLionel Sambuc     struct krb5_log_facility *debug_dest;
273ebfedea0SLionel Sambuc     const krb5_cc_ops **cc_ops;
274ebfedea0SLionel Sambuc     int num_cc_ops;
275ebfedea0SLionel Sambuc     const char *http_proxy;
276ebfedea0SLionel Sambuc     const char *time_fmt;
277ebfedea0SLionel Sambuc     krb5_boolean log_utc;
278ebfedea0SLionel Sambuc     const char *default_keytab;
279ebfedea0SLionel Sambuc     const char *default_keytab_modify;
280ebfedea0SLionel Sambuc     krb5_boolean use_admin_kdc;
281ebfedea0SLionel Sambuc     krb5_addresses *extra_addresses;
282ebfedea0SLionel Sambuc     krb5_boolean scan_interfaces;	/* `ifconfig -a' */
283ebfedea0SLionel Sambuc     krb5_boolean srv_lookup;		/* do SRV lookups */
284ebfedea0SLionel Sambuc     krb5_boolean srv_try_txt;		/* try TXT records also */
285ebfedea0SLionel Sambuc     int32_t fcache_vno;			/* create cache files w/ this
286ebfedea0SLionel Sambuc                                            version */
287ebfedea0SLionel Sambuc     int num_kt_types;			/* # of registered keytab types */
288ebfedea0SLionel Sambuc     struct krb5_keytab_data *kt_types;  /* registered keytab types */
289ebfedea0SLionel Sambuc     const char *date_fmt;
290ebfedea0SLionel Sambuc     char *error_string;
291ebfedea0SLionel Sambuc     krb5_error_code error_code;
292ebfedea0SLionel Sambuc     krb5_addresses *ignore_addresses;
293ebfedea0SLionel Sambuc     char *default_cc_name;
294ebfedea0SLionel Sambuc     char *default_cc_name_env;
295ebfedea0SLionel Sambuc     int default_cc_name_set;
296ebfedea0SLionel Sambuc     void *mutex;			/* protects error_string/error_buf */
297ebfedea0SLionel Sambuc     int large_msg_size;
298ebfedea0SLionel Sambuc     int flags;
299ebfedea0SLionel Sambuc #define KRB5_CTX_F_DNS_CANONICALIZE_HOSTNAME	1
300ebfedea0SLionel Sambuc #define KRB5_CTX_F_CHECK_PAC			2
301ebfedea0SLionel Sambuc #define KRB5_CTX_F_HOMEDIR_ACCESS		4
302ebfedea0SLionel Sambuc #define KRB5_CTX_F_SOCKETS_INITIALIZED          8
303ebfedea0SLionel Sambuc #define KRB5_CTX_F_RD_REQ_IGNORE		16
304ebfedea0SLionel Sambuc     struct send_to_kdc *send_to_kdc;
305ebfedea0SLionel Sambuc #ifdef PKINIT
306ebfedea0SLionel Sambuc     hx509_context hx509ctx;
307ebfedea0SLionel Sambuc #endif
308ebfedea0SLionel Sambuc } krb5_context_data;
309ebfedea0SLionel Sambuc 
310ebfedea0SLionel Sambuc #ifndef KRB5_USE_PATH_TOKENS
311ebfedea0SLionel Sambuc #define KRB5_DEFAULT_CCNAME_FILE "FILE:/tmp/krb5cc_%{uid}"
312ebfedea0SLionel Sambuc #else
313ebfedea0SLionel Sambuc #define KRB5_DEFAULT_CCNAME_FILE "FILE:%{TEMP}/krb5cc_%{uid}"
314ebfedea0SLionel Sambuc #endif
315ebfedea0SLionel Sambuc #define KRB5_DEFAULT_CCNAME_API "API:"
316ebfedea0SLionel Sambuc #define KRB5_DEFAULT_CCNAME_KCM_KCM "KCM:%{uid}"
317ebfedea0SLionel Sambuc #define KRB5_DEFAULT_CCNAME_KCM_API "API:%{uid}"
318ebfedea0SLionel Sambuc 
319ebfedea0SLionel Sambuc #define EXTRACT_TICKET_ALLOW_CNAME_MISMATCH		1
320ebfedea0SLionel Sambuc #define EXTRACT_TICKET_ALLOW_SERVER_MISMATCH		2
321ebfedea0SLionel Sambuc #define EXTRACT_TICKET_MATCH_REALM			4
322ebfedea0SLionel Sambuc #define EXTRACT_TICKET_AS_REQ				8
323ebfedea0SLionel Sambuc #define EXTRACT_TICKET_TIMESYNC				16
324ebfedea0SLionel Sambuc 
325ebfedea0SLionel Sambuc /*
326ebfedea0SLionel Sambuc  * Configurable options
327ebfedea0SLionel Sambuc  */
328ebfedea0SLionel Sambuc 
329ebfedea0SLionel Sambuc #ifndef KRB5_DEFAULT_CCTYPE
330ebfedea0SLionel Sambuc #ifdef __APPLE__
331ebfedea0SLionel Sambuc #define KRB5_DEFAULT_CCTYPE (&krb5_acc_ops)
332ebfedea0SLionel Sambuc #else
333ebfedea0SLionel Sambuc #define KRB5_DEFAULT_CCTYPE (&krb5_fcc_ops)
334ebfedea0SLionel Sambuc #endif
335ebfedea0SLionel Sambuc #endif
336ebfedea0SLionel Sambuc 
337ebfedea0SLionel Sambuc #ifndef KRB5_ADDRESSLESS_DEFAULT
338ebfedea0SLionel Sambuc #define KRB5_ADDRESSLESS_DEFAULT TRUE
339ebfedea0SLionel Sambuc #endif
340ebfedea0SLionel Sambuc 
341ebfedea0SLionel Sambuc #ifndef KRB5_FORWARDABLE_DEFAULT
342ebfedea0SLionel Sambuc #define KRB5_FORWARDABLE_DEFAULT TRUE
343ebfedea0SLionel Sambuc #endif
344ebfedea0SLionel Sambuc 
345ebfedea0SLionel Sambuc #ifdef PKINIT
346ebfedea0SLionel Sambuc 
347ebfedea0SLionel Sambuc struct krb5_pk_identity {
348ebfedea0SLionel Sambuc     hx509_verify_ctx verify_ctx;
349ebfedea0SLionel Sambuc     hx509_certs certs;
350ebfedea0SLionel Sambuc     hx509_cert cert;
351ebfedea0SLionel Sambuc     hx509_certs anchors;
352ebfedea0SLionel Sambuc     hx509_certs certpool;
353ebfedea0SLionel Sambuc     hx509_revoke_ctx revokectx;
354ebfedea0SLionel Sambuc     int flags;
355ebfedea0SLionel Sambuc #define PKINIT_BTMM 1
356ebfedea0SLionel Sambuc };
357ebfedea0SLionel Sambuc 
358ebfedea0SLionel Sambuc enum krb5_pk_type {
359ebfedea0SLionel Sambuc     PKINIT_WIN2K = 1,
360ebfedea0SLionel Sambuc     PKINIT_27 = 2
361ebfedea0SLionel Sambuc };
362ebfedea0SLionel Sambuc 
363ebfedea0SLionel Sambuc #endif /* PKINIT */
364ebfedea0SLionel Sambuc 
365ebfedea0SLionel Sambuc #endif /* __KRB5_LOCL_H__ */
366