From: Tom Yu Date: Tue, 14 Oct 1997 19:40:18 +0000 (+0000) Subject: * des.h: Define KRB_INT32 for the purposes of dealing with the key X-Git-Tag: krb5-1.1-beta1~995 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=423ce5ae4690ab37cce135dd25038e989441f19a;p=krb5.git * des.h: Define KRB_INT32 for the purposes of dealing with the key schedule. Also, define the key schedule more sanely. See related comments in lib/crypto/des. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10230 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/include/kerberosIV/ChangeLog b/src/include/kerberosIV/ChangeLog index 43cb228ba..ad87af896 100644 --- a/src/include/kerberosIV/ChangeLog +++ b/src/include/kerberosIV/ChangeLog @@ -1,3 +1,9 @@ +Tue Oct 14 15:39:28 1997 Tom Yu + + * des.h: Define KRB_INT32 for the purposes of dealing with the key + schedule. Also, define the key schedule more sanely. See related + comments in lib/crypto/des. + Sat Feb 22 00:49:37 1997 Sam Hartman * krb.h: Do not depend on unix being defined on Unix systems; diff --git a/src/include/kerberosIV/des.h b/src/include/kerberosIV/des.h index 82423aa0d..bb0275f97 100644 --- a/src/include/kerberosIV/des.h +++ b/src/include/kerberosIV/des.h @@ -68,8 +68,27 @@ typedef unsigned char des_cblock[8]; /* crypto-block size */ + /* Key schedule */ -typedef struct des_ks_struct { des_cblock _; } des_key_schedule[16]; +/* Ick. We need this in here unfortunately... */ +#ifndef KRB_INT32 +#ifdef SIZEOF_INT +#if SIZEOF_INT >= 4 +#define KRB_INT32 int +#else +#define KRB_INT32 long +#endif +#else /* !defined(SIZEOF_INT) */ +#include +#if (UINT_MAX >= 0xffffffff) +#define KRB_INT32 int +#else +#define KRB_INT32 long +#endif +#endif /* !defined(SIZEOF_INT) */ +#endif /* !defined(KRB_INT32) */ + +typedef struct des_ks_struct { KRB_INT32 _[2]; } des_key_schedule[16]; #define DES_KEY_SZ (sizeof(des_cblock)) #define DES_ENCRYPT 1