* Copyright (c) 1995, 1996, 1997, 2002 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
#include <afsconfig.h>
#include <afs/param.h>
+#include <afs/stds.h>
+
+#include <roken.h>
#ifdef IGNORE_SOME_GCC_WARNINGS
# pragma GCC diagnostic warning "-Wimplicit-function-declaration"
#endif
-#include <afs/stds.h>
-#include <sys/types.h>
-#ifdef AFS_NT40_ENV
-#include <winsock2.h>
-#else
-#include <netinet/in.h>
-#endif
-#include <string.h>
#include <rx/xdr.h>
#include <rx/rx.h>
+
+#include <hcrypto/md4.h>
+#include <hcrypto/md5.h>
+#include <hcrypto/des.h>
+
#include "lifetimes.h"
#include "rxkad.h"
+#include "rxkad_convert.h"
#include "v5gen-rewrite.h"
#include "v5gen.h"
#include "der.h"
#include "v5der.c"
#include "v5gen.c"
-#include "md4.h"
-#include "md5.h"
/*
* Principal conversion Taken from src/lib/krb5/krb/conv_princ from MIT Kerberos. If you
* bug with MIT by sending mail to krb5-bugs@mit.edu.
*/
-extern afs_int32 des_cbc_encrypt(void * in, void * out,
- register afs_int32 length,
- des_key_schedule key, des_cblock *iv,
- int encrypt);
-extern int des_key_sched(register des_cblock k, des_key_schedule schedule);
-
struct krb_convert {
char *v4_str;
char *v5_str;
goto cleanup;
}
- /* If kvno is null, it's probably not included because it was kvno==0
+ /* If kvno is null, it's probably not included because it was kvno==0
* in the ticket */
if (t5.enc_part.kvno == NULL) {
v5_serv_kvno = 0;
}
if (!disableCheckdot) {
- /*
+ /*
* If the first part of the name_string contains a dot, punt since
* then we can't see the diffrence between the kerberos 5
* principals foo.root and foo/root later in the fileserver.
{
int (*cksum_func) (void *, size_t, void *, size_t,
struct ktc_encryptionKey *);
- des_cblock ivec;
- des_key_schedule s;
+ DES_cblock ivec;
+ DES_key_schedule s;
char cksum[24];
size_t cksumsz;
int ret = 1; /* failure */
cksum_func = NULL;
- des_key_sched(ktc_to_cblock(key), (struct des_ks_struct *)&s);
+ DES_key_sched(ktc_to_cblock(key), &s);
#define CONFOUNDERSZ 8
abort();
}
- des_cbc_encrypt(in, out, insz, s, &ivec, 0);
+ DES_cbc_encrypt(in, out, insz, &s, &ivec, 0);
memcpy(cksum, (char *)out + CONFOUNDERSZ, cksumsz);
memset((char *)out + CONFOUNDERSZ, 0, cksumsz);