/* get a particular key */
int
-afsconf_GetKey(void *rock, afs_int32 avno, struct ktc_encryptionKey *akey)
+afsconf_GetKey(void *rock, int avno, struct ktc_encryptionKey *akey)
{
struct afsconf_dir *adir = (struct afsconf_dir *) rock;
register int i, maxa;
extern afs_int32 afsconf_GetLatestKey(struct afsconf_dir *adir,
afs_int32 * avno,
struct ktc_encryptionKey *akey);
-extern int afsconf_GetKey(void *rock, afs_int32 avno,
+extern int afsconf_GetKey(void *rock, int avno,
struct ktc_encryptionKey *akey);
extern int afsconf_AddKey(struct afsconf_dir *adir, afs_int32 akvno,
char akey[8], afs_int32 overwrite);
/*
* Use key1 and key2 as iv */
- fc_keysched(key1, sched);
+ fc_keysched((struct ktc_encryptionKey *)key1, sched);
memcpy(iv, key2, sizeof(iv));
fc_cbc_encrypt(the_quick, ciph, sizeof(the_quick), sched, iv, ENCRYPT);
if (memcmp(ciph1, ciph, sizeof(ciph1)) != 0) {
/*
* Use key2 and key1 as iv
*/
- fc_keysched(key2, sched);
+ fc_keysched((struct ktc_encryptionKey *)key2, sched);
memcpy(iv, key1, sizeof(iv));
fc_cbc_encrypt(the_quick, ciph, sizeof(the_quick), sched, iv, ENCRYPT);
if (memcmp(ciph2, ciph, sizeof(ciph2)) != 0) {
/*
* Test Encrypt- and Decrypt-Packet, use key1 and key2 as iv
*/
- fc_keysched(key1, sched);
+ fc_keysched((struct ktc_encryptionKey *)key1, sched);
memcpy(iv, key2, sizeof(iv));
strcpy(clear, the_quick);
packet.wirevec[1].iov_base = clear;
struct timeval start, stop;
int i;
- fc_keysched(key1, sched);
+ fc_keysched((struct ktc_encryptionKey *)key1, sched);
gettimeofday(&start, 0);
for (i = 0; i < 1000000; i++)
- fc_keysched(key1, sched);
+ fc_keysched((struct ktc_encryptionKey *)key1, sched);
gettimeofday(&stop, 0);
printf("fc_keysched = %2.2f us\n",
(stop.tv_sec - start.tv_sec +
struct rxkad_sprivate {
rxkad_type type; /* always server */
rxkad_level level; /* minimum security level of server */
- char *get_key_rock; /* rock for get_key function */
- int (*get_key) (); /* func. of kvno and server key ptr */
- int (*user_ok) (); /* func called with new client name */
+ void *get_key_rock; /* rock for get_key function */
+ int (*get_key) (void *, int,
+ struct ktc_encryptionKey *);
+ /* func. of kvno and server key ptr */
+ int (*user_ok) (char *, char *,
+ char *, afs_int32);
+ /* func called with new client name */
afs_uint32 flags; /* configuration flags */
};
assert((head) && ((head)->prev == NULL)); \
} while(0)
-void rxkad_global_stats_init() {
+void rxkad_global_stats_init(void) {
assert(pthread_mutex_init(&rxkad_global_stats_lock, (const pthread_mutexattr_t *)0) == 0);
assert(pthread_key_create(&rxkad_stats_key, NULL) == 0);
memset(&rxkad_global_stats, 0, sizeof(rxkad_global_stats));
}
rxkad_stats_t *
-rxkad_thr_stats_init() {
+rxkad_thr_stats_init(void) {
rxkad_stats_t * rxkad_stats;
rxkad_stats = (rxkad_stats_t *)malloc(sizeof(rxkad_stats_t));
assert(rxkad_stats != NULL && pthread_setspecific(rxkad_stats_key,rxkad_stats) == 0);
extern rxkad_level rxkad_StringToLevel(char *string);
extern char *rxkad_LevelToString(rxkad_level level);
+extern void rxkad_global_stats_init(void);
/* rxkad_errs.c */
/* rxkad_server.c */
extern struct rx_securityClass *rxkad_NewServerSecurityObject(rxkad_level
- level, char
+ level, void
*get_key_rock,
int (*get_key)
- (char
+ (void
*get_key_rock,
int kvno,
struct
* Currently only used by the AFS/DFS protocol translator to recognize
* Kerberos V5 tickets. The actual code to do that is provided externally.
*/
-afs_int32(*rxkad_AlternateTicketDecoder) ();
+afs_int32(*rxkad_AlternateTicketDecoder) (afs_int32, char *, afs_int32,
+ char *, char *, char *,
+ struct ktc_encryptionKey *,
+ afs_int32 *, afs_uint32 *,
+ afs_uint32 *);
static struct rx_securityOps rxkad_server_ops = {
rxkad_Close,
*/
struct rx_securityClass *
-rxkad_NewServerSecurityObject(rxkad_level level, char *get_key_rock,
- int (*get_key) (char *get_key_rock, int kvno,
+rxkad_NewServerSecurityObject(rxkad_level level, void *get_key_rock,
+ int (*get_key) (void *get_key_rock, int kvno,
struct ktc_encryptionKey *
serverKey),
int (*user_ok) (char *name, char *instance,