2 * Copyright (c) 1995-2000 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. Neither the name of the Institute nor the names of its contributors
18 * may be used to endorse or promote products derived from this software
19 * without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 #ifndef __KRB4_PROTOS_H
37 #define __KRB4_PROTOS_H
39 #define krb4_get_int _rxkad_krb4_get_int
40 #define krb4_put_int _rxkad_krb4_put_int
41 #define krb4_get_address _rxkad_krb4_get_address
42 #define krb4_put_address _rxkad_krb4_put_address
43 #define krb4_put_string _rxkad_krb4_put_string
44 #define krb4_get_string _rxkad_krb4_get_string
45 #define krb4_get_nir _rxkad_krb4_get_nir
46 #define krb4_put_nir _rxkad_krb4_put_nir
47 #define krb4_life_to_atime _rxkad_krb4_life_to_atime
48 #define krb4_atime_to_life _rxkad_krb4_atime_to_life
49 #define krb4_life_to_time _rxkad_krb4_life_to_time
50 #define decomp_ticket _rxkad_decomp_ticket
53 krb4_get_int(void *f
, u_int32_t
*to
, int size
, int lsb
);
56 krb4_put_int(u_int32_t from
, void *to
, size_t rem
, int size
);
59 krb4_get_address(void *from
, u_int32_t
*to
);
62 krb4_put_address(u_int32_t addr
, void *to
, size_t rem
);
65 krb4_put_string(const char *from
, void *to
, size_t rem
);
68 krb4_get_string(void *from
, char *to
, size_t to_size
);
71 krb4_get_nir(void *from
,
72 char *name
, size_t name_len
,
73 char *instance
, size_t instance_len
,
74 char *realm
, size_t realm_len
);
77 krb4_put_nir(const char *name
,
84 decomp_ticket(KTEXT tkt
, /* The ticket to be decoded */
85 unsigned char *flags
, /* Kerberos ticket flags */
86 char *pname
, /* Authentication name */
87 char *pinstance
, /* Principal's instance */
88 char *prealm
, /* Principal's authentication domain */
89 u_int32_t
*paddress
,/* Net address of entity requesting ticket */
90 unsigned char *session
, /* Session key inserted in ticket */
91 int *life
, /* Lifetime of the ticket */
92 u_int32_t
*time_sec
, /* Issue time and date */
93 char *sname
, /* Service name */
94 char *sinstance
, /* Service instance */
95 DES_cblock
*key
, /* Service's secret key (to decrypt the ticket) */
96 DES_key_schedule
*schedule
); /* The precomputed key schedule */
98 int krb_get_lrealm (char *r
, int n
);
101 krb4_life_to_atime(int life
);
104 krb4_atime_to_life(char *atime
);
106 int krb_time_to_life(u_int32_t start
, u_int32_t end
);
109 krb4_life_to_time(u_int32_t start
, int life_
);
111 #endif /* __KRB4_PROTOS_H */