kauth warning reduction
[openafs.git] / src / rxkad / rxkad_prototypes.h
index 7db7bc2..0fead04 100644 (file)
 #include "fcrypt.h"
 #include "rx/rx.h"
 
+/* Don't include des.h where it can cause conflict with krb4 headers */
+#if !defined(NO_DES_H_INCLUDE)
+#include <des.h>
+#endif
+
 /* domestic/crypt_conn.c */
 extern afs_int32 rxkad_DecryptPacket(const struct rx_connection *conn,
                                     const fc_KeySchedule * schedule,
@@ -129,7 +134,7 @@ extern afs_int32 rxkad_SetConfiguration(struct rx_securityClass *aobj,
 /* ticket.c */
 extern int tkt_DecodeTicket(char *asecret, afs_int32 ticketLen,
                            struct ktc_encryptionKey *key, char *name,
-                           char *inst, char *cell, char *sessionKey,
+                           char *inst, char *cell, struct ktc_encryptionKey *sessionKey,
                            afs_int32 * host, afs_int32 * start,
                            afs_int32 * end);
 extern int tkt_MakeTicket(char *ticket, int *ticketLen,
@@ -145,11 +150,24 @@ extern unsigned char time_to_life(afs_uint32 start, afs_uint32 end);
 
 /* ticket5.c */
 extern int tkt_DecodeTicket5(char *ticket, afs_int32 ticket_len,
-                            int (*get_key) (char *, int,
+                            int (*get_key) (void *, int,
                                             struct ktc_encryptionKey *),
                             char *get_key_rock, int serv_kvno, char *name,
-                            char *inst, char *cell, char *session_key,
+                            char *inst, char *cell, struct ktc_encryptionKey *session_key,
                             afs_int32 * host, afs_int32 * start,
                             afs_int32 * end, afs_int32 disableDotCheck);
 
+#if !defined(NO_DES_H_INCLUDE)
+static_inline unsigned char *
+ktc_to_cblock(struct ktc_encryptionKey *key) {
+    return (unsigned char *)key;
+}
+
+static_inline des_cblock *
+ktc_to_cblockptr(struct ktc_encryptionKey *key) {
+    return (des_cblock *)key;
+}
+#endif
+
+
 #endif