summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-04-16 12:31:48 +1000
committerDamien Miller <djm@mindrot.org>2000-04-16 12:31:48 +1000
commit5f05637b0ef7058d3ab2ff385251f73dcc9cb5f7 (patch)
tree443665fb58916f33c2f346aa3284a444d3352311
parenta664e870f27e6dc2c73f393e95a229abc527e0e6 (diff)
- Reduce diff against OpenBSD source
- All OpenSSL includes are now unconditionally referenced as openssl/foo.h - Pick up formatting changes - Other minor changed (typecasts, etc) that I missed
-rw-r--r--ChangeLog7
-rw-r--r--acconfig.h3
-rw-r--r--atomicio.c4
-rw-r--r--auth-passwd.c2
-rw-r--r--auth-rh-rsa.c15
-rw-r--r--auth-rsa.c8
-rw-r--r--auth-skey.c9
-rw-r--r--authfd.c7
-rw-r--r--authfile.c8
-rw-r--r--bufaux.c21
-rw-r--r--buffer.h14
-rw-r--r--cipher.c7
-rw-r--r--cipher.h12
-rw-r--r--configure.in21
-rw-r--r--entropy.c12
-rw-r--r--fingerprint.c7
-rw-r--r--hostfile.c13
-rw-r--r--includes.h3
-rw-r--r--kex.h11
-rw-r--r--key.c13
-rw-r--r--md5crypt.c7
-rw-r--r--mpaux.c10
-rw-r--r--packet.c16
-rw-r--r--packet.h7
-rw-r--r--rsa.h13
-rw-r--r--session.c6
-rw-r--r--ssh-agent.c5
-rw-r--r--sshconnect.c17
-rw-r--r--sshd.c19
29 files changed, 65 insertions, 232 deletions
diff --git a/ChangeLog b/ChangeLog
index f23250edf..e921e2275 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
120000416
2 - Reduce diff against OpenBSD source
3 - All OpenSSL includes are now unconditionally referenced as
4 openssl/foo.h
5 - Pick up formatting changes
6 - Other minor changed (typecasts, etc) that I missed
7
120000415 820000415
2 - OpenBSD CVS updates. 9 - OpenBSD CVS updates.
3 [ssh.1 ssh.c] 10 [ssh.1 ssh.c]
diff --git a/acconfig.h b/acconfig.h
index cbb3a97cd..b0420e7fe 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -30,9 +30,6 @@
30/* Define if you want to install preformatted manpages.*/ 30/* Define if you want to install preformatted manpages.*/
31#undef MANTYPE 31#undef MANTYPE
32 32
33/* Define if your ssl headers are included with #include <ssl/header.h> */
34#undef HAVE_SSL
35
36/* Define if your ssl headers are included with #include <openssl/header.h> */ 33/* Define if your ssl headers are included with #include <openssl/header.h> */
37#undef HAVE_OPENSSL 34#undef HAVE_OPENSSL
38 35
diff --git a/atomicio.c b/atomicio.c
index 1299e5bf7..3f12344ea 100644
--- a/atomicio.c
+++ b/atomicio.c
@@ -24,7 +24,7 @@
24 */ 24 */
25 25
26#include "includes.h" 26#include "includes.h"
27RCSID("$Id: atomicio.c,v 1.10 2000/03/17 12:40:15 damien Exp $"); 27RCSID("$Id: atomicio.c,v 1.11 2000/04/16 02:31:49 damien Exp $");
28 28
29#include "xmalloc.h" 29#include "xmalloc.h"
30#include "ssh.h" 30#include "ssh.h"
@@ -43,7 +43,7 @@ atomicio(f, fd, _s, n)
43 ssize_t res, pos = 0; 43 ssize_t res, pos = 0;
44 44
45 while (n > pos) { 45 while (n > pos) {
46 res = (f) (fd, (char*)s + pos, n - pos); 46 res = (f) (fd, s + pos, n - pos);
47 switch (res) { 47 switch (res) {
48 case -1: 48 case -1:
49 if (errno == EINTR || errno == EAGAIN) 49 if (errno == EINTR || errno == EAGAIN)
diff --git a/auth-passwd.c b/auth-passwd.c
index d2c2ea876..662f85f63 100644
--- a/auth-passwd.c
+++ b/auth-passwd.c
@@ -11,7 +11,7 @@
11 11
12#ifndef USE_PAM 12#ifndef USE_PAM
13 13
14RCSID("$Id: auth-passwd.c,v 1.17 2000/04/16 01:18:39 damien Exp $"); 14RCSID("$Id: auth-passwd.c,v 1.18 2000/04/16 02:31:49 damien Exp $");
15 15
16#include "packet.h" 16#include "packet.h"
17#include "ssh.h" 17#include "ssh.h"
diff --git a/auth-rh-rsa.c b/auth-rh-rsa.c
index 150132fb4..1073ecc10 100644
--- a/auth-rh-rsa.c
+++ b/auth-rh-rsa.c
@@ -15,18 +15,7 @@
15 */ 15 */
16 16
17#include "includes.h" 17#include "includes.h"
18RCSID("$Id: auth-rh-rsa.c,v 1.10 2000/04/16 01:18:39 damien Exp $"); 18RCSID("$Id: auth-rh-rsa.c,v 1.11 2000/04/16 02:31:49 damien Exp $");
19
20#ifdef HAVE_OPENSSL
21#include <openssl/bn.h>
22#include <openssl/rsa.h>
23#include <openssl/dsa.h>
24#endif
25#ifdef HAVE_SSL
26#include <ssl/bn.h>
27#include <ssl/rsa.h>
28#include <ssl/dsa.h>
29#endif
30 19
31#include "packet.h" 20#include "packet.h"
32#include "ssh.h" 21#include "ssh.h"
@@ -34,6 +23,8 @@ RCSID("$Id: auth-rh-rsa.c,v 1.10 2000/04/16 01:18:39 damien Exp $");
34#include "uidswap.h" 23#include "uidswap.h"
35#include "servconf.h" 24#include "servconf.h"
36 25
26#include <openssl/rsa.h>
27#include <openssl/dsa.h>
37#include "key.h" 28#include "key.h"
38#include "hostfile.h" 29#include "hostfile.h"
39 30
diff --git a/auth-rsa.c b/auth-rsa.c
index e9d61f69b..aa8be2bb0 100644
--- a/auth-rsa.c
+++ b/auth-rsa.c
@@ -16,7 +16,7 @@
16 */ 16 */
17 17
18#include "includes.h" 18#include "includes.h"
19RCSID("$Id: auth-rsa.c,v 1.16 2000/04/16 01:18:39 damien Exp $"); 19RCSID("$Id: auth-rsa.c,v 1.17 2000/04/16 02:31:49 damien Exp $");
20 20
21#include "rsa.h" 21#include "rsa.h"
22#include "packet.h" 22#include "packet.h"
@@ -27,14 +27,8 @@ RCSID("$Id: auth-rsa.c,v 1.16 2000/04/16 01:18:39 damien Exp $");
27#include "match.h" 27#include "match.h"
28#include "servconf.h" 28#include "servconf.h"
29 29
30#ifdef HAVE_OPENSSL
31#include <openssl/rsa.h> 30#include <openssl/rsa.h>
32#include <openssl/md5.h> 31#include <openssl/md5.h>
33#endif
34#ifdef HAVE_SSL
35#include <ssl/rsa.h>
36#include <ssl/md5.h>
37#endif
38 32
39/* Flags that may be set in authorized_keys options. */ 33/* Flags that may be set in authorized_keys options. */
40extern int no_port_forwarding_flag; 34extern int no_port_forwarding_flag;
diff --git a/auth-skey.c b/auth-skey.c
index 056efeb9b..7eb32e8f2 100644
--- a/auth-skey.c
+++ b/auth-skey.c
@@ -1,17 +1,10 @@
1#include "includes.h" 1#include "includes.h"
2
3#ifdef SKEY 2#ifdef SKEY
4RCSID("$Id: auth-skey.c,v 1.6 2000/04/14 10:30:29 markus Exp $"); 3RCSID("$Id: auth-skey.c,v 1.6 2000/04/14 10:30:29 markus Exp $");
5 4
6#include "ssh.h" 5#include "ssh.h"
7#include "packet.h" 6#include "packet.h"
8 7#include <sha1.h>
9#ifdef HAVE_OPENSSL
10#include <openssl/sha.h>
11#endif
12#ifdef HAVE_SSL
13#include <ssl/sha.h>
14#endif
15 8
16/* from %OpenBSD: skeylogin.c,v 1.32 1999/08/16 14:46:56 millert Exp % */ 9/* from %OpenBSD: skeylogin.c,v 1.32 1999/08/16 14:46:56 millert Exp % */
17 10
diff --git a/authfd.c b/authfd.c
index d920b1f66..3476e799a 100644
--- a/authfd.c
+++ b/authfd.c
@@ -14,7 +14,7 @@
14 */ 14 */
15 15
16#include "includes.h" 16#include "includes.h"
17RCSID("$Id: authfd.c,v 1.12 2000/04/16 01:18:40 damien Exp $"); 17RCSID("$Id: authfd.c,v 1.13 2000/04/16 02:31:49 damien Exp $");
18 18
19#include "ssh.h" 19#include "ssh.h"
20#include "rsa.h" 20#include "rsa.h"
@@ -24,12 +24,7 @@ RCSID("$Id: authfd.c,v 1.12 2000/04/16 01:18:40 damien Exp $");
24#include "xmalloc.h" 24#include "xmalloc.h"
25#include "getput.h" 25#include "getput.h"
26 26
27#ifdef HAVE_OPENSSL
28#include <openssl/rsa.h> 27#include <openssl/rsa.h>
29#endif
30#ifdef HAVE_SSL
31#include <ssl/rsa.h>
32#endif
33 28
34/* Returns the number of the authentication fd, or -1 if there is none. */ 29/* Returns the number of the authentication fd, or -1 if there is none. */
35 30
diff --git a/authfile.c b/authfile.c
index d7912d0da..e17c60381 100644
--- a/authfile.c
+++ b/authfile.c
@@ -15,15 +15,9 @@
15 */ 15 */
16 16
17#include "includes.h" 17#include "includes.h"
18RCSID("$Id: authfile.c,v 1.10 2000/04/16 01:18:40 damien Exp $"); 18RCSID("$Id: authfile.c,v 1.11 2000/04/16 02:31:49 damien Exp $");
19 19
20#ifdef HAVE_OPENSSL
21#include <openssl/bn.h> 20#include <openssl/bn.h>
22#endif
23#ifdef HAVE_SSL
24#include <ssl/bn.h>
25#endif
26
27#include "xmalloc.h" 21#include "xmalloc.h"
28#include "buffer.h" 22#include "buffer.h"
29#include "bufaux.h" 23#include "bufaux.h"
diff --git a/bufaux.c b/bufaux.c
index b4d52270a..9ae5e9e61 100644
--- a/bufaux.c
+++ b/bufaux.c
@@ -17,17 +17,10 @@
17 */ 17 */
18 18
19#include "includes.h" 19#include "includes.h"
20RCSID("$Id: bufaux.c,v 1.11 2000/04/16 01:18:40 damien Exp $"); 20RCSID("$Id: bufaux.c,v 1.12 2000/04/16 02:31:50 damien Exp $");
21 21
22#include "ssh.h" 22#include "ssh.h"
23
24#ifdef HAVE_OPENSSL
25#include <openssl/bn.h> 23#include <openssl/bn.h>
26#endif
27#ifdef HAVE_SSL
28#include <ssl/bn.h>
29#endif
30
31#include "bufaux.h" 24#include "bufaux.h"
32#include "xmalloc.h" 25#include "xmalloc.h"
33#include "getput.h" 26#include "getput.h"
@@ -131,7 +124,7 @@ buffer_get_bignum2(Buffer *buffer, BIGNUM *value)
131/* 124/*
132 * Returns an integer from the buffer (4 bytes, msb first). 125 * Returns an integer from the buffer (4 bytes, msb first).
133 */ 126 */
134unsigned int 127unsigned int
135buffer_get_int(Buffer *buffer) 128buffer_get_int(Buffer *buffer)
136{ 129{
137 unsigned char buf[4]; 130 unsigned char buf[4];
@@ -142,7 +135,7 @@ buffer_get_int(Buffer *buffer)
142/* 135/*
143 * Stores an integer in the buffer in 4 bytes, msb first. 136 * Stores an integer in the buffer in 4 bytes, msb first.
144 */ 137 */
145void 138void
146buffer_put_int(Buffer *buffer, unsigned int value) 139buffer_put_int(Buffer *buffer, unsigned int value)
147{ 140{
148 char buf[4]; 141 char buf[4];
@@ -182,13 +175,13 @@ buffer_get_string(Buffer *buffer, unsigned int *length_ptr)
182/* 175/*
183 * Stores and arbitrary binary string in the buffer. 176 * Stores and arbitrary binary string in the buffer.
184 */ 177 */
185void 178void
186buffer_put_string(Buffer *buffer, const void *buf, unsigned int len) 179buffer_put_string(Buffer *buffer, const void *buf, unsigned int len)
187{ 180{
188 buffer_put_int(buffer, len); 181 buffer_put_int(buffer, len);
189 buffer_append(buffer, buf, len); 182 buffer_append(buffer, buf, len);
190} 183}
191void 184void
192buffer_put_cstring(Buffer *buffer, const char *s) 185buffer_put_cstring(Buffer *buffer, const char *s)
193{ 186{
194 buffer_put_string(buffer, s, strlen(s)); 187 buffer_put_string(buffer, s, strlen(s));
@@ -197,7 +190,7 @@ buffer_put_cstring(Buffer *buffer, const char *s)
197/* 190/*
198 * Returns a character from the buffer (0 - 255). 191 * Returns a character from the buffer (0 - 255).
199 */ 192 */
200int 193int
201buffer_get_char(Buffer *buffer) 194buffer_get_char(Buffer *buffer)
202{ 195{
203 char ch; 196 char ch;
@@ -208,7 +201,7 @@ buffer_get_char(Buffer *buffer)
208/* 201/*
209 * Stores a character in the buffer. 202 * Stores a character in the buffer.
210 */ 203 */
211void 204void
212buffer_put_char(Buffer *buffer, int value) 205buffer_put_char(Buffer *buffer, int value)
213{ 206{
214 char ch = value; 207 char ch = value;
diff --git a/buffer.h b/buffer.h
index bae740545..f33e6f724 100644
--- a/buffer.h
+++ b/buffer.h
@@ -1,19 +1,19 @@
1/* 1/*
2 * 2 *
3 * buffer.h 3 * buffer.h
4 * 4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 5 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 * 6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 8 * All rights reserved
9 * 9 *
10 * Created: Sat Mar 18 04:12:25 1995 ylo 10 * Created: Sat Mar 18 04:12:25 1995 ylo
11 * 11 *
12 * Code for manipulating FIFO buffers. 12 * Code for manipulating FIFO buffers.
13 * 13 *
14 */ 14 */
15 15
16/* RCSID("$Id: buffer.h,v 1.3 1999/11/25 00:54:58 damien Exp $"); */ 16/* RCSID("$Id: buffer.h,v 1.4 2000/04/16 02:31:50 damien Exp $"); */
17 17
18#ifndef BUFFER_H 18#ifndef BUFFER_H
19#define BUFFER_H 19#define BUFFER_H
diff --git a/cipher.c b/cipher.c
index edc50dcf4..639c1abbd 100644
--- a/cipher.c
+++ b/cipher.c
@@ -12,18 +12,13 @@
12 */ 12 */
13 13
14#include "includes.h" 14#include "includes.h"
15RCSID("$Id: cipher.c,v 1.19 2000/04/16 01:18:41 damien Exp $"); 15RCSID("$Id: cipher.c,v 1.20 2000/04/16 02:31:50 damien Exp $");
16 16
17#include "ssh.h" 17#include "ssh.h"
18#include "cipher.h" 18#include "cipher.h"
19#include "xmalloc.h" 19#include "xmalloc.h"
20 20
21#ifdef HAVE_OPENSSL
22#include <openssl/md5.h> 21#include <openssl/md5.h>
23#endif
24#ifdef HAVE_SSL
25#include <ssl/md5.h>
26#endif
27 22
28/* 23/*
29 * This is used by SSH1: 24 * This is used by SSH1:
diff --git a/cipher.h b/cipher.h
index 383e3444f..0f94fb206 100644
--- a/cipher.h
+++ b/cipher.h
@@ -11,25 +11,15 @@
11 * 11 *
12 */ 12 */
13 13
14/* RCSID("$Id: cipher.h,v 1.11 2000/04/16 01:18:41 damien Exp $"); */ 14/* RCSID("$Id: cipher.h,v 1.12 2000/04/16 02:31:50 damien Exp $"); */
15 15
16#ifndef CIPHER_H 16#ifndef CIPHER_H
17#define CIPHER_H 17#define CIPHER_H
18 18
19#include "config.h"
20
21#ifdef HAVE_OPENSSL
22#include <openssl/des.h> 19#include <openssl/des.h>
23#include <openssl/blowfish.h> 20#include <openssl/blowfish.h>
24#include <openssl/rc4.h> 21#include <openssl/rc4.h>
25#include <openssl/cast.h> 22#include <openssl/cast.h>
26#endif
27#ifdef HAVE_SSL
28#include <ssl/des.h>
29#include <ssl/blowfish.h>
30#include <ssl/rc4.h>
31#include <ssl/cast.h>
32#endif
33 23
34/* Cipher types. New types can be added, but old types should not be removed 24/* Cipher types. New types can be added, but old types should not be removed
35 for compatibility. The maximum allowed value is 31. */ 25 for compatibility. The maximum allowed value is 31. */
diff --git a/configure.in b/configure.in
index 3c26e3d74..b676193d3 100644
--- a/configure.in
+++ b/configure.in
@@ -213,27 +213,6 @@ for ssldir in "" $tryssldir /usr/local/openssl /usr/lib/openssl /usr/local/ssl /
213 break; 213 break;
214 ], [] 214 ], []
215 ) 215 )
216 AC_TRY_RUN(
217 [
218 #include <ssl/rsa.h>
219 #include <ssl/bn.h>
220 #include <ssl/sha.h>
221 int main(void)
222 {
223 RSA *key; char a[2048],b[2048];;
224 memset(a, 0, sizeof(a));memset(b, 0, sizeof(b));
225 RAND_seed(a, sizeof(a));
226 key=RSA_generate_key(32,3,NULL,NULL);
227 if (key==NULL) return(1);
228 return(-1==RSA_private_decrypt(RSA_size(key),a,b,key,RSA_NO_PADDING));
229 }
230 ],
231 [
232 AC_DEFINE(HAVE_SSL)
233 found_crypto=1
234 break;
235 ], []
236 )
237 done 216 done
238 217
239 if test ! -z "$found_crypto" ; then 218 if test ! -z "$found_crypto" ; then
diff --git a/entropy.c b/entropy.c
index f304e21c1..549fe7026 100644
--- a/entropy.c
+++ b/entropy.c
@@ -32,16 +32,10 @@
32#include "ssh.h" 32#include "ssh.h"
33#include "xmalloc.h" 33#include "xmalloc.h"
34 34
35#ifdef HAVE_OPENSSL 35#include <openssl/rand.h>
36# include <openssl/rand.h> 36#include <openssl/sha.h>
37# include <openssl/sha.h>
38#endif
39#ifdef HAVE_SSL
40# include <ssl/rand.h>
41# include <ssl/sha.h>
42#endif
43 37
44RCSID("$Id: entropy.c,v 1.4 2000/04/08 07:48:56 damien Exp $"); 38RCSID("$Id: entropy.c,v 1.5 2000/04/16 02:31:50 damien Exp $");
45 39
46#ifdef EGD_SOCKET 40#ifdef EGD_SOCKET
47#ifndef offsetof 41#ifndef offsetof
diff --git a/fingerprint.c b/fingerprint.c
index e6f27d061..4b0966d91 100644
--- a/fingerprint.c
+++ b/fingerprint.c
@@ -28,16 +28,11 @@
28 */ 28 */
29 29
30#include "includes.h" 30#include "includes.h"
31RCSID("$Id: fingerprint.c,v 1.5 2000/03/16 20:56:14 markus Exp $"); 31RCSID("$Id: fingerprint.c,v 1.6 2000/04/12 09:39:10 markus Exp $");
32 32
33#include "ssh.h" 33#include "ssh.h"
34#include "xmalloc.h" 34#include "xmalloc.h"
35#ifdef HAVE_OPENSSL
36#include <openssl/md5.h> 35#include <openssl/md5.h>
37#endif
38#ifdef HAVE_SSL
39#include <ssl/md5.h>
40#endif
41 36
42#define FPRINT "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x" 37#define FPRINT "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x"
43 38
diff --git a/hostfile.c b/hostfile.c
index b027075af..29efe5656 100644
--- a/hostfile.c
+++ b/hostfile.c
@@ -16,20 +16,11 @@
16#include "includes.h" 16#include "includes.h"
17RCSID("$OpenBSD: hostfile.c,v 1.16 2000/04/14 10:30:31 markus Exp $"); 17RCSID("$OpenBSD: hostfile.c,v 1.16 2000/04/14 10:30:31 markus Exp $");
18 18
19#ifdef HAVE_OPENSSL
20#include <openssl/bn.h>
21#include <openssl/rsa.h>
22#include <openssl/dsa.h>
23#endif
24#ifdef HAVE_SSL
25#include <ssl/bn.h>
26#include <ssl/rsa.h>
27#include <ssl/dsa.h>
28#endif
29
30#include "packet.h" 19#include "packet.h"
31#include "match.h" 20#include "match.h"
32#include "ssh.h" 21#include "ssh.h"
22#include <openssl/rsa.h>
23#include <openssl/dsa.h>
33#include "key.h" 24#include "key.h"
34#include "hostfile.h" 25#include "hostfile.h"
35 26
diff --git a/includes.h b/includes.h
index 512266762..1a0e76f39 100644
--- a/includes.h
+++ b/includes.h
@@ -108,6 +108,9 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
108#include "fake-getnameinfo.h" 108#include "fake-getnameinfo.h"
109#include "fake-socket.h" 109#include "fake-socket.h"
110 110
111/* Entropy collection */
112#include "entropy.h"
113
111/* Define this to be the path of the xauth program. */ 114/* Define this to be the path of the xauth program. */
112#ifndef XAUTH_PATH 115#ifndef XAUTH_PATH
113#define XAUTH_PATH "/usr/X11R6/bin/xauth" 116#define XAUTH_PATH "/usr/X11R6/bin/xauth"
diff --git a/kex.h b/kex.h
index 29e1e887f..5395ebc3f 100644
--- a/kex.h
+++ b/kex.h
@@ -29,17 +29,6 @@
29#ifndef KEX_H 29#ifndef KEX_H
30#define KEX_H 30#define KEX_H
31 31
32#include "config.h"
33
34#ifdef HAVE_OPENSSL
35# include <openssl/bn.h>
36# include <openssl/evp.h>
37#endif
38#ifdef HAVE_SSL
39# include <ssl/bn.h>
40# include <ssl/evp.h>
41#endif
42
43#define KEX_DH1 "diffie-hellman-group1-sha1" 32#define KEX_DH1 "diffie-hellman-group1-sha1"
44#define KEX_DSS "ssh-dss" 33#define KEX_DSS "ssh-dss"
45 34
diff --git a/key.c b/key.c
index 437a5e245..872313abc 100644
--- a/key.c
+++ b/key.c
@@ -32,21 +32,10 @@
32 */ 32 */
33 33
34#include "includes.h" 34#include "includes.h"
35 35#include "ssh.h"
36#ifdef HAVE_OPENSSL
37#include <openssl/bn.h>
38#include <openssl/rsa.h> 36#include <openssl/rsa.h>
39#include <openssl/dsa.h> 37#include <openssl/dsa.h>
40#include <openssl/evp.h> 38#include <openssl/evp.h>
41#endif
42#ifdef HAVE_SSL
43#include <ssl/bn.h>
44#include <ssl/rsa.h>
45#include <ssl/dsa.h>
46#include <ssl/evp.h>
47#endif
48
49#include "ssh.h"
50#include "xmalloc.h" 39#include "xmalloc.h"
51#include "key.h" 40#include "key.h"
52 41
diff --git a/md5crypt.c b/md5crypt.c
index 16bcf33a1..a9f0f26dd 100644
--- a/md5crypt.c
+++ b/md5crypt.c
@@ -21,14 +21,7 @@
21 21
22#include <unistd.h> 22#include <unistd.h>
23#include <string.h> 23#include <string.h>
24
25#ifdef HAVE_OPENSSL
26#include <openssl/md5.h> 24#include <openssl/md5.h>
27#endif
28
29#ifdef HAVE_SSL
30#include <ssl/md5.h>
31#endif
32 25
33static unsigned char itoa64[] = /* 0 ... 63 => ascii - 64 */ 26static unsigned char itoa64[] = /* 0 ... 63 => ascii - 64 */
34 "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; 27 "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
diff --git a/mpaux.c b/mpaux.c
index 4deefe689..2384c826b 100644
--- a/mpaux.c
+++ b/mpaux.c
@@ -15,19 +15,13 @@
15*/ 15*/
16 16
17#include "includes.h" 17#include "includes.h"
18RCSID("$Id: mpaux.c,v 1.11 2000/04/16 01:18:43 damien Exp $"); 18RCSID("$Id: mpaux.c,v 1.12 2000/04/16 02:31:51 damien Exp $");
19 19
20#include <openssl/bn.h>
20#include "getput.h" 21#include "getput.h"
21#include "xmalloc.h" 22#include "xmalloc.h"
22 23
23#ifdef HAVE_OPENSSL
24#include <openssl/bn.h>
25#include <openssl/md5.h> 24#include <openssl/md5.h>
26#endif
27#ifdef HAVE_SSL
28#include <ssl/bn.h>
29#include <ssl/md5.h>
30#endif
31 25
32void 26void
33compute_session_id(unsigned char session_id[16], 27compute_session_id(unsigned char session_id[16],
diff --git a/packet.c b/packet.c
index cb8fa15b4..e32c70546 100644
--- a/packet.c
+++ b/packet.c
@@ -17,18 +17,7 @@
17 */ 17 */
18 18
19#include "includes.h" 19#include "includes.h"
20RCSID("$Id: packet.c,v 1.18 2000/04/16 01:18:43 damien Exp $"); 20RCSID("$Id: packet.c,v 1.19 2000/04/16 02:31:51 damien Exp $");
21
22#ifdef HAVE_OPENSSL
23# include <openssl/bn.h>
24# include <openssl/dh.h>
25# include <openssl/hmac.h>
26#endif /* HAVE_OPENSSL */
27#ifdef HAVE_SSL
28# include <ssl/bn.h>
29# include <ssl/dh.h>
30# include <ssl/hmac.h>
31#endif /* HAVE_SSL */
32 21
33#include "xmalloc.h" 22#include "xmalloc.h"
34#include "buffer.h" 23#include "buffer.h"
@@ -46,6 +35,9 @@ RCSID("$Id: packet.c,v 1.18 2000/04/16 01:18:43 damien Exp $");
46#include "compat.h" 35#include "compat.h"
47#include "ssh2.h" 36#include "ssh2.h"
48 37
38#include <openssl/bn.h>
39#include <openssl/dh.h>
40#include <openssl/hmac.h>
49#include "buffer.h" 41#include "buffer.h"
50#include "kex.h" 42#include "kex.h"
51#include "hmac.h" 43#include "hmac.h"
diff --git a/packet.h b/packet.h
index 93495bbfc..b5fc196ef 100644
--- a/packet.h
+++ b/packet.h
@@ -13,17 +13,12 @@
13 * 13 *
14 */ 14 */
15 15
16/* RCSID("$Id: packet.h,v 1.14 2000/04/16 01:18:44 damien Exp $"); */ 16/* RCSID("$Id: packet.h,v 1.15 2000/04/16 02:31:51 damien Exp $"); */
17 17
18#ifndef PACKET_H 18#ifndef PACKET_H
19#define PACKET_H 19#define PACKET_H
20 20
21#ifdef HAVE_OPENSSL
22#include <openssl/bn.h> 21#include <openssl/bn.h>
23#endif
24#ifdef HAVE_SSL
25#include <ssl/bn.h>
26#endif
27 22
28/* 23/*
29 * Sets the socket used for communication. Disables encryption until 24 * Sets the socket used for communication. Disables encryption until
diff --git a/rsa.h b/rsa.h
index e819c5f23..672f20d49 100644
--- a/rsa.h
+++ b/rsa.h
@@ -13,24 +13,13 @@
13 * 13 *
14*/ 14*/
15 15
16/* RCSID("$Id: rsa.h,v 1.8 2000/04/16 01:18:45 damien Exp $"); */ 16/* RCSID("$Id: rsa.h,v 1.9 2000/04/16 02:31:51 damien Exp $"); */
17 17
18#ifndef RSA_H 18#ifndef RSA_H
19#define RSA_H 19#define RSA_H
20 20
21#include "config.h"
22
23#ifdef HAVE_OPENSSL
24#include <openssl/bn.h> 21#include <openssl/bn.h>
25#include <openssl/rsa.h> 22#include <openssl/rsa.h>
26#include <openssl/rand.h>
27#endif
28
29#ifdef HAVE_SSL
30#include <ssl/bn.h>
31#include <ssl/rsa.h>
32#include <ssl/rand.h>
33#endif
34 23
35/* Calls SSL RSA_generate_key, only copies to prv and pub */ 24/* Calls SSL RSA_generate_key, only copies to prv and pub */
36void rsa_generate_key(RSA * prv, RSA * pub, unsigned int bits); 25void rsa_generate_key(RSA * prv, RSA * pub, unsigned int bits);
diff --git a/session.c b/session.c
index 8d8ff223e..24bc25c6f 100644
--- a/session.c
+++ b/session.c
@@ -1247,6 +1247,8 @@ session_pty_req(Session *s)
1247 /* Get window size from the packet. */ 1247 /* Get window size from the packet. */
1248 pty_change_window_size(s->ptyfd, s->row, s->col, s->xpixel, s->ypixel); 1248 pty_change_window_size(s->ptyfd, s->row, s->col, s->xpixel, s->ypixel);
1249 1249
1250 /* XXX parse and set terminal modes */
1251 xfree(term_modes);
1250 return 1; 1252 return 1;
1251} 1253}
1252 1254
@@ -1286,6 +1288,7 @@ session_input_channel_req(int id, void *arg)
1286 success = 1; 1288 success = 1;
1287 } else if (strcmp(rtype, "exec") == 0) { 1289 } else if (strcmp(rtype, "exec") == 0) {
1288 char *command = packet_get_string(&len); 1290 char *command = packet_get_string(&len);
1291 packet_done();
1289 if (s->ttyfd == -1) 1292 if (s->ttyfd == -1)
1290 do_exec_no_pty(s, command, s->pw); 1293 do_exec_no_pty(s, command, s->pw);
1291 else 1294 else
@@ -1293,8 +1296,7 @@ session_input_channel_req(int id, void *arg)
1293 xfree(command); 1296 xfree(command);
1294 success = 1; 1297 success = 1;
1295 } else if (strcmp(rtype, "pty-req") == 0) { 1298 } else if (strcmp(rtype, "pty-req") == 0) {
1296 if (session_pty_req(s) > 0) 1299 success = session_pty_req(s);
1297 success = 1;
1298 } 1300 }
1299 } 1301 }
1300 if (strcmp(rtype, "window-change") == 0) { 1302 if (strcmp(rtype, "window-change") == 0) {
diff --git a/ssh-agent.c b/ssh-agent.c
index 66439461e..fac2a2c38 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -21,12 +21,7 @@ RCSID("$OpenBSD: ssh-agent.c,v 1.28 2000/04/14 10:30:33 markus Exp $");
21#include "getput.h" 21#include "getput.h"
22#include "mpaux.h" 22#include "mpaux.h"
23 23
24#ifdef HAVE_OPENSSL
25#include <openssl/md5.h> 24#include <openssl/md5.h>
26#endif
27#ifdef HAVE_SSL
28#include <ssl/md5.h>
29#endif
30 25
31typedef struct { 26typedef struct {
32 int fd; 27 int fd;
diff --git a/sshconnect.c b/sshconnect.c
index bca0bf43a..3c5c990f2 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -12,19 +12,7 @@
12#include "includes.h" 12#include "includes.h"
13RCSID("$OpenBSD: sshconnect.c,v 1.68 2000/04/14 10:30:33 markus Exp $"); 13RCSID("$OpenBSD: sshconnect.c,v 1.68 2000/04/14 10:30:33 markus Exp $");
14 14
15#ifdef HAVE_OPENSSL
16#include <openssl/bn.h> 15#include <openssl/bn.h>
17#include <openssl/rsa.h>
18#include <openssl/dsa.h>
19#include <openssl/md5.h>
20#endif
21#ifdef HAVE_SSL
22#include <ssl/bn.h>
23#include <ssl/rsa.h>
24#include <ssl/dsa.h>
25#include <ssl/md5.h>
26#endif
27
28#include "xmalloc.h" 16#include "xmalloc.h"
29#include "rsa.h" 17#include "rsa.h"
30#include "ssh.h" 18#include "ssh.h"
@@ -38,8 +26,13 @@ RCSID("$OpenBSD: sshconnect.c,v 1.68 2000/04/14 10:30:33 markus Exp $");
38#include "readconf.h" 26#include "readconf.h"
39 27
40#include "bufaux.h" 28#include "bufaux.h"
29#include <openssl/rsa.h>
30#include <openssl/dsa.h>
41 31
42#include "ssh2.h" 32#include "ssh2.h"
33#include <openssl/md5.h>
34#include <openssl/dh.h>
35#include <openssl/hmac.h>
43#include "kex.h" 36#include "kex.h"
44#include "myproposal.h" 37#include "myproposal.h"
45#include "key.h" 38#include "key.h"
diff --git a/sshd.c b/sshd.c
index cc6bee96a..c8508e931 100644
--- a/sshd.c
+++ b/sshd.c
@@ -29,21 +29,12 @@ RCSID("$OpenBSD: sshd.c,v 1.105 2000/04/14 10:30:33 markus Exp $");
29#include "buffer.h" 29#include "buffer.h"
30 30
31#include "ssh2.h" 31#include "ssh2.h"
32#ifdef HAVE_OPENSSL 32#include <openssl/dh.h>
33# include <openssl/dh.h> 33#include <openssl/bn.h>
34# include <openssl/bn.h> 34#include <openssl/hmac.h>
35# include <openssl/hmac.h>
36# include <openssl/dsa.h>
37# include <openssl/rsa.h>
38#endif
39#ifdef HAVE_SSL
40# include <ssl/dh.h>
41# include <ssl/bn.h>
42# include <ssl/hmac.h>
43# include <ssl/dsa.h>
44# include <ssl/rsa.h>
45#endif
46#include "kex.h" 35#include "kex.h"
36#include <openssl/dsa.h>
37#include <openssl/rsa.h>
47#include "key.h" 38#include "key.h"
48#include "dsa.h" 39#include "dsa.h"
49 40