2 * Copyright (c) 1997 Kungliga Tekniska Högskolan
3 * (Royal Institute of Technology, Stockholm, Sweden).
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
17 * 3. All advertising materials mentioning features or use of this software
18 * must display the following acknowledgement:
19 * This product includes software developed by Kungliga Tekniska
20 * Högskolan and its contributors.
22 * 4. Neither the name of the Institute nor the names of its contributors
23 * may be used to endorse or promote products derived from this software
24 * without specific prior written permission.
26 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
27 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
41 #ifndef __KRB5_LOCL_H__
42 #define __KRB5_LOCL_H__
54 #ifdef HAVE_SYS_TYPES_H
55 #include <sys/types.h>
64 #if defined(HAVE_SYS_IOCTL_H) && SunOS != 4
65 #include <sys/ioctl.h>
71 #ifdef HAVE_SYS_PARAM_H
72 #include <sys/param.h>
75 #ifdef HAVE_SYS_TIME_H
78 #ifdef HAVE_SYS_SELECT_H
79 #include <sys/select.h>
81 #ifdef HAVE_SYS_SOCKET_H
82 #include <sys/socket.h>
84 #ifdef HAVE_NETINET_IN_H
85 #include <netinet/in.h>
87 #ifdef HAVE_NETINET_IN6_H
88 #include <netinet/in6.h>
96 #ifdef HAVE_SYS_FILIO_H
97 #include <sys/filio.h>
107 #include <krb5_err.h>
108 #include <asn1_err.h>
114 krb5_error_code
krb5_data_alloc(krb5_data
*, int);
115 krb5_error_code
krb5_data_realloc(krb5_data
*, int);
116 krb5_error_code
krb5_data_copy(krb5_data
*, void *, size_t);
118 /* set_default_realm.c */
121 krb5_set_default_realm(krb5_context context
,
124 /* get_default_realm.c */
127 krb5_get_default_realm(krb5_context context
,
132 krb5_error_code
krb5_config_parse_file (const char *fname
,
133 krb5_config_section
**res
);
134 const void *krb5_config_get_next (krb5_config_section
*c
,
135 krb5_config_binding
**pointer
,
138 const void *krb5_config_vget_next (krb5_config_section
*c
,
139 krb5_config_binding
**pointer
,
143 const void *krb5_config_get (krb5_config_section
*c
,
147 const void *krb5_config_vget (krb5_config_section
*c
,
151 const char *krb5_config_get_string (krb5_config_section
*c
,
153 const char *krb5_config_vget_string (krb5_config_section
*c
,
156 char **krb5_config_vget_strings(krb5_config_section
*c
, va_list args
);
157 char **krb5_config_get_strings(krb5_config_section
*c
, ...);
158 void krb5_config_free_strings(char **strings
);
160 krb5_boolean
krb5_config_vget_bool (krb5_config_section
*c
, va_list args
);
162 krb5_boolean
krb5_config_get_bool (krb5_config_section
*c
, ...);
164 int krb5_config_vget_time (krb5_config_section
*c
, va_list args
);
166 int krb5_config_get_time (krb5_config_section
*c
, ...);
168 const krb5_config_binding
*krb5_config_get_list (krb5_config_section
*c
,
170 const krb5_config_binding
*krb5_config_vget_list (krb5_config_section
*c
,
174 krb5_config_file_free (krb5_config_section
*s
);
177 krb5_getportbyname (const char *service
,
182 krb5_sendto_kdc (krb5_context context
,
183 const krb5_data
*send
,
184 const krb5_realm
*realm
,
188 krb5_build_ap_req (krb5_context context
,
190 krb5_flags ap_options
,
191 krb5_data authenticator
,
195 krb5_build_authenticator (krb5_context context
,
196 krb5_auth_context auth_context
,
199 Authenticator
**auth
,
203 krb5_generate_random_block(void *buf
, size_t len
);
205 #define ALLOC(X, N) (X) = calloc((N), sizeof(*(X)))
208 extract_ticket(krb5_context context
,
212 krb5_const_pointer keyseed
,
213 krb5_addresses
*addr
,
215 krb5_decrypt_proc decrypt_proc
,
216 krb5_const_pointer decryptarg
);
219 krb5_init_etype (krb5_context context
,
222 const krb5_enctype
*etypes
);
224 PA_DATA
*krb5_find_padata(PA_DATA
*, unsigned, int, int*);
226 #endif /* __KRB5_LOCL_H__ */