4 * Copyright (c) 1995 - 2001, 2003 Kungliga Tekniska Högskolan
5 * (Royal Institute of Technology, Stockholm, Sweden).
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * 3. Neither the name of the Institute nor the names of its contributors
20 * may be used to endorse or promote products derived from this software
21 * without specific prior written permission.
23 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
24 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
41 /* Krb4 tickets can't have a key version number of 213 or 256. This is used
42 * as a magic kvno to indicate that this is really a krb5 ticket. The
43 * real kvno can be retrieved from the cleartext portion of the
44 * ticket. For more info see the Transarc header file rxkad.h.
46 #define RXKAD_TKT_TYPE_KERBEROS_V5 256
47 #define RXKAD_TKT_TYPE_KERBEROS_V5_ENCPART_ONLY 213
49 /* Is this really large enough for a krb5 ticket? */
50 #define MAXKRB5TICKETLEN 1024
51 #define MAXKRB4TICKETLEN 1024
53 typedef char rxkad_level
;
54 #define rxkad_clear 0 /* checksum some selected header fields */
55 #define rxkad_auth 1 /* rxkad_clear + protected packet length */
56 #define rxkad_crypt 2 /* rxkad_crypt + encrypt packet payload */
57 extern int rxkad_min_level
; /* enforce min level at client end */
59 extern int rxkad_EpochWasSet
;
62 struct ktc_encryptionKey
;
64 int32_t rxkad_GetServerInfoNew (struct rx_connection
*con
,
70 struct rx_securityClass
*
71 rxkad_NewServerSecurityObjectNew(/*rxkad_level*/ int min_level
,
73 int (*get_key
)(void *appl_data
,
75 struct ktc_encryptionKey
*),
76 int (*user_ok
)(char *name
,
79 struct rx_securityClass
*
80 rxkad_NewClientSecurityObject(/*rxkad_level*/ int level
,
86 #define RXKADINCONSISTENCY (19270400L)
87 #define RXKADPACKETSHORT (19270401L)
88 #define RXKADLEVELFAIL (19270402L)
89 #define RXKADTICKETLEN (19270403L)
90 #define RXKADOUTOFSEQUENCE (19270404L)
91 #define RXKADNOAUTH (19270405L)
92 #define RXKADBADKEY (19270406L)
93 #define RXKADBADTICKET (19270407L)
94 #define RXKADUNKNOWNKEY (19270408L)
95 #define RXKADEXPIRED (19270409L)
96 #define RXKADSEALEDINCON (19270410L)
97 #define RXKADDATALEN (19270411L)
98 #define RXKADILLEGALLEVEL (19270412L)
100 /* The rest is backwards compatibility stuff that we don't use! */
101 #define MAXKTCTICKETLIFETIME (30*24*60*60)
102 #define MINKTCTICKETLEN (32)
103 #define MAXKTCTICKETLEN (344)
104 #define MAXKTCNAMELEN (64)
105 #define MAXKTCREALMLEN (64)
108 #define MAXKTCNAMELEN ANAME_SZ
109 #define MAXKTCREALMLEN REALM_SZ
113 #define CLOCK_SKEW (5*60)
116 #define KTC_TIME_UNCERTAINTY (CLOCK_SKEW)
119 #define KTC_TIME_UNCERTAINTY (60*15)
122 struct ktc_encryptionKey
{
126 struct ktc_principal
{
127 char name
[MAXKTCNAMELEN
];
128 char instance
[MAXKTCNAMELEN
];
129 char cell
[MAXKTCREALMLEN
];
133 #endif /* __RXKAD_H */