summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Karl Ramm <kcr@mit.edu>2008-12-24 23:52:23 +0000
committerGravatar Karl Ramm <kcr@mit.edu>2008-12-24 23:52:23 +0000
commitd44cdd8600187a9c000d1e036c7dd8721c941caf (patch)
treefb4a4262d802dff06ee1c03a3c6e67d047310ac7 /lib
parentb1aa1f99237b8743dc10defbbc14a8fa359a6c9f (diff)
make this work^H^H^H^Hcompile with Heimdal
Diffstat (limited to 'lib')
-rw-r--r--lib/Zinternal.c10
-rw-r--r--lib/quad_cksum.c13
2 files changed, 12 insertions, 11 deletions
diff --git a/lib/Zinternal.c b/lib/Zinternal.c
index d5e0e44..504a9a8 100644
--- a/lib/Zinternal.c
+++ b/lib/Zinternal.c
@@ -1272,14 +1272,14 @@ Z_Checksum(krb5_data *cksumbuf,
krb5_error_code result;
unsigned char *data;
int len;
-#if HAVE_KRB5_C_MAKE_CHECKSUM
+#ifndef HAVE_KRB5_CRYPTO_INIT
krb5_checksum checksum;
#else
Checksum checksum;
krb5_crypto cryptctx;
#endif
-#if HAVE_KRB5_C_MAKE_CHECKSUM
+#ifndef HAVE_KRB5_CRYPTO_INIT
/* Create the checksum -- MIT crypto API */
result = krb5_c_make_checksum(Z_krb5_ctx, cksumtype,
keyblock, Z_KEYUSAGE_CLT_CKSUM,
@@ -1317,7 +1317,7 @@ Z_Checksum(krb5_data *cksumbuf,
memcpy(*asn1_data, data, len);
*asn1_len = len;
-#if HAVE_KRB5_C_MAKE_CHECKSUM
+#ifndef HAVE_KRB5_CRYPTO_INIT
krb5_free_checksum_contents(Z_krb5_ctx, &checksum);
#else
free_Checksum(&checksum);
@@ -1414,7 +1414,7 @@ Z_krb5_verify_cksum(krb5_keyblock *keyblock,
int asn1_len)
{
krb5_error_code result;
-#if HAVE_KRB5_C_MAKE_CHECKSUM
+#ifndef HAVE_KRB5_CRYPTO_INIT
krb5_checksum checksum;
krb5_boolean valid;
#else
@@ -1424,7 +1424,7 @@ Z_krb5_verify_cksum(krb5_keyblock *keyblock,
#endif
memset(&checksum, 0, sizeof(checksum));
-#if HAVE_KRB5_C_MAKE_CHECKSUM
+#ifndef HAVE_KRB5_CRYPTO_INIT
/* Verify the checksum -- MIT crypto API */
checksum.length = asn1_len;
checksum.contents = asn1_data;
diff --git a/lib/quad_cksum.c b/lib/quad_cksum.c
index 5d06440..dc43e46 100644
--- a/lib/quad_cksum.c
+++ b/lib/quad_cksum.c
@@ -105,6 +105,7 @@
/* System include files */
+#include <sys/types.h>
#include <stdio.h>
#include <errno.h>
@@ -123,7 +124,7 @@
#ifdef HAVE_KRB5
unsigned long
z_quad_cksum(const unsigned char *in, /* input block */
- krb5_ui_4 *out, /* optional longer output */
+ u_int32_t *out, /* optional longer output */
long length, /* original length in bytes */
int out_count, /* number of iterations */
unsigned char *c_seed /* secret seed, 8 bytes */
@@ -137,12 +138,12 @@ z_quad_cksum(const unsigned char *in, /* input block */
* checksum is written unto the address pointed to.
*/
- register krb5_ui_4 z;
- register krb5_ui_4 z2;
- register krb5_ui_4 x;
- register krb5_ui_4 x2;
+ register u_int32_t z;
+ register u_int32_t z2;
+ register u_int32_t x;
+ register u_int32_t x2;
const unsigned char *p;
- register krb5_int32 len;
+ register int32_t len;
register int i;
/* use all 8 bytes of seed */