summaryrefslogtreecommitdiffstats
path: root/src/lib/crypto/des
diff options
context:
space:
mode:
authorKeith Vetter <keithv@fusion.com>1995-03-03 02:20:21 +0000
committerKeith Vetter <keithv@fusion.com>1995-03-03 02:20:21 +0000
commit02a6367ca07d1d098a67121716cf02dfa0d7a0e2 (patch)
treef1d3fffae86d5d463a64f058aa8d8c4c74bc2722 /src/lib/crypto/des
parente61bc5292e6690d3e2e188016274758264351286 (diff)
downloadkrb5-02a6367ca07d1d098a67121716cf02dfa0d7a0e2.tar.gz
krb5-02a6367ca07d1d098a67121716cf02dfa0d7a0e2.tar.xz
krb5-02a6367ca07d1d098a67121716cf02dfa0d7a0e2.zip
Added the files and changes needed to create a dll out of libcrypto
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5068 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/crypto/des')
-rw-r--r--src/lib/crypto/des/ChangeLog7
-rw-r--r--src/lib/crypto/des/Makefile.in2
-rw-r--r--src/lib/crypto/des/f_cbc.c16
-rw-r--r--src/lib/crypto/des/f_tables.h8
-rw-r--r--src/lib/crypto/des/string2key.c3
5 files changed, 22 insertions, 14 deletions
diff --git a/src/lib/crypto/des/ChangeLog b/src/lib/crypto/des/ChangeLog
index 57c8eaab0..049ac7688 100644
--- a/src/lib/crypto/des/ChangeLog
+++ b/src/lib/crypto/des/ChangeLog
@@ -1,3 +1,10 @@
+Thu Mar 2 17:50:39 1995 Keith Vetter (keithv@fusion.com)
+
+ * Makefile.in: changed LIBNAME for the PC.
+ * f_tables.h. f_cbc.c: added cast on the assignment of bits of
+ a long into characters.
+ * string2k.c: promoted an int into a long.
+
Thu Mar 2 18:09:28 1995 Theodore Y. Ts'o <tytso@dcl>
* Makefile.in (ISODELIB): Remove reference to $(ISODELIB).
diff --git a/src/lib/crypto/des/Makefile.in b/src/lib/crypto/des/Makefile.in
index 9425744b3..94be80b3d 100644
--- a/src/lib/crypto/des/Makefile.in
+++ b/src/lib/crypto/des/Makefile.in
@@ -2,7 +2,7 @@ CFLAGS = $(CCOPTS) $(DEFS)
LDFLAGS = -g
##DOSBUILDTOP = ..\..\..
-##DOSLIBNAME=..\libcrypto.$(LIBEXT)
+##DOSLIBNAME=..\crypto.lib
##DOS!include $(BUILDTOP)\config\windows.in
COMERRLIB=$(BUILDTOP)/util/et/libcom_err.$(LIBEXT)
diff --git a/src/lib/crypto/des/f_cbc.c b/src/lib/crypto/des/f_cbc.c
index bac00b2d4..f2f78daf7 100644
--- a/src/lib/crypto/des/f_cbc.c
+++ b/src/lib/crypto/des/f_cbc.c
@@ -189,21 +189,21 @@ mit_des_cbc_encrypt(in, out, length, schedule, ivec, encrypt)
op += (int) length;
switch(length) {
case 8:
- *(--op) = right & 0xff;
+ *(--op) = (unsigned char) (right & 0xff);
case 7:
- *(--op) = (right >> 8) & 0xff;
+ *(--op) = (unsigned char) ((right >> 8) & 0xff);
case 6:
- *(--op) = (right >> 16) & 0xff;
+ *(--op) = (unsigned char) ((right >> 16) & 0xff);
case 5:
- *(--op) = (right >> 24) & 0xff;
+ *(--op) = (unsigned char) ((right >> 24) & 0xff);
case 4:
- *(--op) = left & 0xff;
+ *(--op) = (unsigned char) (left & 0xff);
case 3:
- *(--op) = (left >> 8) & 0xff;
+ *(--op) = (unsigned char) ((left >> 8) & 0xff);
case 2:
- *(--op) = (left >> 16) & 0xff;
+ *(--op) = (unsigned char) ((left >> 16) & 0xff);
case 1:
- *(--op) = (left >> 24) & 0xff;
+ *(--op) = (unsigned char) ((left >> 24) & 0xff);
break;
}
break; /* we're done */
diff --git a/src/lib/crypto/des/f_tables.h b/src/lib/crypto/des/f_tables.h
index a9c63dcc1..29e186056 100644
--- a/src/lib/crypto/des/f_tables.h
+++ b/src/lib/crypto/des/f_tables.h
@@ -221,9 +221,9 @@ extern const unsigned KRB_INT32 des_SP_table[8][64];
(lr) |= (unsigned KRB_INT32)(*(ip)++)
#define PUT_HALF_BLOCK(lr, op) \
- *(op)++ = ((lr) >> 24) & 0xff; \
- *(op)++ = ((lr) >> 16) & 0xff; \
- *(op)++ = ((lr) >> 8) & 0xff; \
- *(op)++ = (lr) & 0xff
+ *(op)++ = (unsigned char) (((lr) >> 24) & 0xff); \
+ *(op)++ = (unsigned char) (((lr) >> 16) & 0xff); \
+ *(op)++ = (unsigned char) (((lr) >> 8) & 0xff); \
+ *(op)++ = (unsigned char) ((lr) & 0xff)
#endif /* __DES_TABLES_H__ */
diff --git a/src/lib/crypto/des/string2key.c b/src/lib/crypto/des/string2key.c
index 4369f1de9..b9dd7115d 100644
--- a/src/lib/crypto/des/string2key.c
+++ b/src/lib/crypto/des/string2key.c
@@ -51,7 +51,8 @@ const krb5_data FAR * salt;
register char *str, *copystr;
register krb5_octet *key;
- register unsigned temp,i;
+ register unsigned temp;
+ register long i;
register int j;
register long length;
unsigned char *k_p;