diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | atomicio.c | 4 | ||||
-rw-r--r-- | cipher.c | 10 | ||||
-rw-r--r-- | configure.in | 2 |
4 files changed, 13 insertions, 8 deletions
@@ -1,3 +1,8 @@ | |||
1 | 19991215 | ||
2 | - Integrated patchs from Juergen Keil <jk@tools.de> | ||
3 | - Avoid void* pointer arithmatic | ||
4 | - Use LDFLAGS correctly | ||
5 | |||
1 | 19991214 | 6 | 19991214 |
2 | - OpenBSD CVS Changes | 7 | - OpenBSD CVS Changes |
3 | - [canohost.c] | 8 | - [canohost.c] |
diff --git a/atomicio.c b/atomicio.c index 46ffee357..fcab2ea7f 100644 --- a/atomicio.c +++ b/atomicio.c | |||
@@ -24,7 +24,7 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include "includes.h" | 26 | #include "includes.h" |
27 | RCSID("$Id: atomicio.c,v 1.7 1999/12/07 06:03:33 damien Exp $"); | 27 | RCSID("$Id: atomicio.c,v 1.8 1999/12/14 22:06:28 damien Exp $"); |
28 | 28 | ||
29 | #include "xmalloc.h" | 29 | #include "xmalloc.h" |
30 | #include "ssh.h" | 30 | #include "ssh.h" |
@@ -42,7 +42,7 @@ atomicio(f, fd, s, n) | |||
42 | int res, pos = 0; | 42 | int res, pos = 0; |
43 | 43 | ||
44 | while (n > pos) { | 44 | while (n > pos) { |
45 | res = (f) (fd, s + pos, n - pos); | 45 | res = (f) (fd, (char*)s + pos, n - pos); |
46 | switch (res) { | 46 | switch (res) { |
47 | case -1: | 47 | case -1: |
48 | if (errno == EINTR || errno == EAGAIN) | 48 | if (errno == EINTR || errno == EAGAIN) |
@@ -12,7 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include "includes.h" | 14 | #include "includes.h" |
15 | RCSID("$Id: cipher.c,v 1.9 1999/12/12 21:27:33 damien Exp $"); | 15 | RCSID("$Id: cipher.c,v 1.10 1999/12/14 22:06:28 damien Exp $"); |
16 | 16 | ||
17 | #include "ssh.h" | 17 | #include "ssh.h" |
18 | #include "cipher.h" | 18 | #include "cipher.h" |
@@ -48,13 +48,13 @@ SSH_3CBC_ENCRYPT(des_key_schedule ks1, | |||
48 | memcpy(&iv1, iv2, 8); | 48 | memcpy(&iv1, iv2, 8); |
49 | 49 | ||
50 | des_cbc_encrypt(src, dest, len, ks1, &iv1, DES_ENCRYPT); | 50 | des_cbc_encrypt(src, dest, len, ks1, &iv1, DES_ENCRYPT); |
51 | memcpy(&iv1, dest + len - 8, 8); | 51 | memcpy(&iv1, (char *)dest + len - 8, 8); |
52 | 52 | ||
53 | des_cbc_encrypt(dest, dest, len, ks2, iv2, DES_DECRYPT); | 53 | des_cbc_encrypt(dest, dest, len, ks2, iv2, DES_DECRYPT); |
54 | memcpy(iv2, &iv1, 8); /* Note how iv1 == iv2 on entry and exit. */ | 54 | memcpy(iv2, &iv1, 8); /* Note how iv1 == iv2 on entry and exit. */ |
55 | 55 | ||
56 | des_cbc_encrypt(dest, dest, len, ks3, iv3, DES_ENCRYPT); | 56 | des_cbc_encrypt(dest, dest, len, ks3, iv3, DES_ENCRYPT); |
57 | memcpy(iv3, dest + len - 8, 8); | 57 | memcpy(iv3, (char *)dest + len - 8, 8); |
58 | } | 58 | } |
59 | 59 | ||
60 | void | 60 | void |
@@ -69,10 +69,10 @@ SSH_3CBC_DECRYPT(des_key_schedule ks1, | |||
69 | memcpy(&iv1, iv2, 8); | 69 | memcpy(&iv1, iv2, 8); |
70 | 70 | ||
71 | des_cbc_encrypt(src, dest, len, ks3, iv3, DES_DECRYPT); | 71 | des_cbc_encrypt(src, dest, len, ks3, iv3, DES_DECRYPT); |
72 | memcpy(iv3, src + len - 8, 8); | 72 | memcpy(iv3, (char *)src + len - 8, 8); |
73 | 73 | ||
74 | des_cbc_encrypt(dest, dest, len, ks2, iv2, DES_ENCRYPT); | 74 | des_cbc_encrypt(dest, dest, len, ks2, iv2, DES_ENCRYPT); |
75 | memcpy(iv2, dest + len - 8, 8); | 75 | memcpy(iv2, (char *)dest + len - 8, 8); |
76 | 76 | ||
77 | des_cbc_encrypt(dest, dest, len, ks1, &iv1, DES_DECRYPT); | 77 | des_cbc_encrypt(dest, dest, len, ks1, &iv1, DES_DECRYPT); |
78 | /* memcpy(&iv1, iv2, 8); */ | 78 | /* memcpy(&iv1, iv2, 8); */ |
diff --git a/configure.in b/configure.in index aa23baece..f77e46a09 100644 --- a/configure.in +++ b/configure.in | |||
@@ -31,7 +31,7 @@ AC_SUBST(ssldir) | |||
31 | AC_DEFINE_UNQUOTED(ssldir, "$ssldir") | 31 | AC_DEFINE_UNQUOTED(ssldir, "$ssldir") |
32 | if test "$ssldir" != "/usr"; then | 32 | if test "$ssldir" != "/usr"; then |
33 | CFLAGS="$CFLAGS -I$ssldir/include" | 33 | CFLAGS="$CFLAGS -I$ssldir/include" |
34 | LIBS="$LIBS -L$ssldir/lib" | 34 | LDFLAGS="$LDFLAGS -L$ssldir/lib" |
35 | fi | 35 | fi |
36 | LIBS="$LIBS -lssl -lcrypto" | 36 | LIBS="$LIBS -lssl -lcrypto" |
37 | AC_MSG_RESULT($ssldir) | 37 | AC_MSG_RESULT($ssldir) |