]> andersk Git - openssh.git/commitdiff
- Reduce diff against OpenBSD source
authordamien <damien>
Sun, 16 Apr 2000 02:31:48 +0000 (02:31 +0000)
committerdamien <damien>
Sun, 16 Apr 2000 02:31:48 +0000 (02:31 +0000)
   - All OpenSSL includes are now unconditionally referenced as
     openssl/foo.h
   - Pick up formatting changes
   - Other minor changed (typecasts, etc) that I missed

28 files changed:
ChangeLog
acconfig.h
atomicio.c
auth-rh-rsa.c
auth-rsa.c
auth-skey.c
authfd.c
authfile.c
bufaux.c
buffer.h
cipher.c
cipher.h
configure.in
entropy.c
fingerprint.c
hostfile.c
includes.h
kex.h
key.c
md5crypt.c
mpaux.c
packet.c
packet.h
rsa.h
session.c
ssh-agent.c
sshconnect.c
sshd.c

index f23250edffec4fb4fce5241b69d8d96986197bc7..e921e2275981cd80b19fc52a5cad8fdb505dfd6c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+20000416
+ - 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
+
 20000415
  - OpenBSD CVS updates.
    [ssh.1 ssh.c]
index cbb3a97cd9a4fc079b68a3b21ba5e06ff1071c96..b0420e7fe34dc46a78206fe6ce4004c577483500 100644 (file)
@@ -30,9 +30,6 @@
 /* Define if you want to install preformatted manpages.*/
 #undef MANTYPE
 
-/* Define if your ssl headers are included with #include <ssl/header.h>  */
-#undef HAVE_SSL
-
 /* Define if your ssl headers are included with #include <openssl/header.h>  */
 #undef HAVE_OPENSSL
 
index f9a364878c47226efad7cff34ab1112401da418e..1060dc0e896888af1b21a348693092e001e2c88b 100644 (file)
@@ -43,7 +43,7 @@ atomicio(f, fd, _s, n)
        ssize_t res, pos = 0;
 
        while (n > pos) {
-               res = (f) (fd, (char*)s + pos, n - pos);
+               res = (f) (fd, s + pos, n - pos);
                switch (res) {
                case -1:
                        if (errno == EINTR || errno == EAGAIN)
index b2730d6bfc159155247a3b4680cf44f118f2e8d7..52ce688ce9d38a93c18e7053ae69bcae5013ffd4 100644 (file)
 #include "includes.h"
 RCSID("$Id$");
 
-#ifdef HAVE_OPENSSL
-#include <openssl/bn.h>
-#include <openssl/rsa.h>
-#include <openssl/dsa.h>
-#endif
-#ifdef HAVE_SSL
-#include <ssl/bn.h>
-#include <ssl/rsa.h>
-#include <ssl/dsa.h>
-#endif
-
 #include "packet.h"
 #include "ssh.h"
 #include "xmalloc.h"
 #include "uidswap.h"
 #include "servconf.h"
 
+#include <openssl/rsa.h>
+#include <openssl/dsa.h>
 #include "key.h"
 #include "hostfile.h"
 
index 5fcdae4c6e505dc32b1ccf95e34aec637ba6389a..1e8c947f52a96c730a4eabe902f1f9a62d5d04a8 100644 (file)
@@ -27,14 +27,8 @@ RCSID("$Id$");
 #include "match.h"
 #include "servconf.h"
 
-#ifdef HAVE_OPENSSL
 #include <openssl/rsa.h>
 #include <openssl/md5.h>
-#endif
-#ifdef HAVE_SSL
-#include <ssl/rsa.h>
-#include <ssl/md5.h>
-#endif
 
 /* Flags that may be set in authorized_keys options. */
 extern int no_port_forwarding_flag;
index 7082d0c8bbb0c164c5cd8247dc744069b2fe8e0f..16b06bf36324d152881861697d22e36fa7dc2307 100644 (file)
@@ -1,17 +1,10 @@
 #include "includes.h"
-
 #ifdef SKEY
 RCSID("$Id$");
 
 #include "ssh.h"
 #include "packet.h"
-
-#ifdef HAVE_OPENSSL
-#include <openssl/sha.h>
-#endif
-#ifdef HAVE_SSL
-#include <ssl/sha.h>
-#endif
+#include <sha1.h>
 
 /* from %OpenBSD: skeylogin.c,v 1.32 1999/08/16 14:46:56 millert Exp % */
 
index 52a0ee5bfb57417239826978516d9b3a6a4232b4..bea665575d873f3bd5e293084ccd6086c7a83277 100644 (file)
--- a/authfd.c
+++ b/authfd.c
@@ -24,12 +24,7 @@ RCSID("$Id$");
 #include "xmalloc.h"
 #include "getput.h"
 
-#ifdef HAVE_OPENSSL
 #include <openssl/rsa.h>
-#endif
-#ifdef HAVE_SSL
-#include <ssl/rsa.h>
-#endif
 
 /* Returns the number of the authentication fd, or -1 if there is none. */
 
index 79c14d220e4e9aec5ee78890f2cca5186163a56f..2998cc596968aeac5e7d9d5dedf8d85abb3f7227 100644 (file)
 #include "includes.h"
 RCSID("$Id$");
 
-#ifdef HAVE_OPENSSL
 #include <openssl/bn.h>
-#endif
-#ifdef HAVE_SSL
-#include <ssl/bn.h>
-#endif
-
 #include "xmalloc.h"
 #include "buffer.h"
 #include "bufaux.h"
index def645fc4276d250884f839cd18f8051567e3353..29ff477f10e9f67358616aea766965846081b118 100644 (file)
--- a/bufaux.c
+++ b/bufaux.c
 RCSID("$Id$");
 
 #include "ssh.h"
-
-#ifdef HAVE_OPENSSL
 #include <openssl/bn.h>
-#endif
-#ifdef HAVE_SSL
-#include <ssl/bn.h>
-#endif
-
 #include "bufaux.h"
 #include "xmalloc.h"
 #include "getput.h"
@@ -131,7 +124,7 @@ buffer_get_bignum2(Buffer *buffer, BIGNUM *value)
 /*
  * Returns an integer from the buffer (4 bytes, msb first).
  */
-unsigned int 
+unsigned int
 buffer_get_int(Buffer *buffer)
 {
        unsigned char buf[4];
@@ -142,7 +135,7 @@ buffer_get_int(Buffer *buffer)
 /*
  * Stores an integer in the buffer in 4 bytes, msb first.
  */
-void 
+void
 buffer_put_int(Buffer *buffer, unsigned int value)
 {
        char buf[4];
@@ -182,13 +175,13 @@ buffer_get_string(Buffer *buffer, unsigned int *length_ptr)
 /*
  * Stores and arbitrary binary string in the buffer.
  */
-void 
+void
 buffer_put_string(Buffer *buffer, const void *buf, unsigned int len)
 {
        buffer_put_int(buffer, len);
        buffer_append(buffer, buf, len);
 }
-void 
+void
 buffer_put_cstring(Buffer *buffer, const char *s)
 {
        buffer_put_string(buffer, s, strlen(s));
@@ -197,7 +190,7 @@ buffer_put_cstring(Buffer *buffer, const char *s)
 /*
  * Returns a character from the buffer (0 - 255).
  */
-int 
+int
 buffer_get_char(Buffer *buffer)
 {
        char ch;
@@ -208,7 +201,7 @@ buffer_get_char(Buffer *buffer)
 /*
  * Stores a character in the buffer.
  */
-void 
+void
 buffer_put_char(Buffer *buffer, int value)
 {
        char ch = value;
index 4cdd2f9182a9d5b8cc665c057837d6c5095b6be7..ecab2add784e98c344a929549d5214c5ba73d678 100644 (file)
--- a/buffer.h
+++ b/buffer.h
@@ -1,16 +1,16 @@
 /*
- * 
+ *
  * buffer.h
- * 
+ *
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
- * 
+ *
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
  *                    All rights reserved
- * 
+ *
  * Created: Sat Mar 18 04:12:25 1995 ylo
- * 
+ *
  * Code for manipulating FIFO buffers.
- * 
+ *
  */
 
 /* RCSID("$Id$"); */
index 7122dfa86519b0ea941bd050093ccdcf6d1c920e..361da070a693a5536715af954884ce497d7fe4ba 100644 (file)
--- a/cipher.c
+++ b/cipher.c
@@ -18,12 +18,7 @@ RCSID("$Id$");
 #include "cipher.h"
 #include "xmalloc.h"
 
-#ifdef HAVE_OPENSSL
 #include <openssl/md5.h>
-#endif
-#ifdef HAVE_SSL
-#include <ssl/md5.h>
-#endif
 
 /*
  * This is used by SSH1:
index 37ca25176ddda864c250075cb82321457eb7fac9..9f7c8fddf4d3a4f4769dac8289220f378205c74d 100644 (file)
--- a/cipher.h
+++ b/cipher.h
 #ifndef CIPHER_H
 #define CIPHER_H
 
-#include "config.h"
-
-#ifdef HAVE_OPENSSL
 #include <openssl/des.h>
 #include <openssl/blowfish.h>
 #include <openssl/rc4.h>
 #include <openssl/cast.h>
-#endif
-#ifdef HAVE_SSL
-#include <ssl/des.h>
-#include <ssl/blowfish.h>
-#include <ssl/rc4.h>
-#include <ssl/cast.h>
-#endif
 
 /* Cipher types.  New types can be added, but old types should not be removed
    for compatibility.  The maximum allowed value is 31. */
index 3c26e3d74fba71963b9f22971b53c6d4b46cd0fd..b676193d3dd575e6b3213af06014642f1a60c9d9 100644 (file)
@@ -213,27 +213,6 @@ for ssldir in "" $tryssldir /usr/local/openssl /usr/lib/openssl /usr/local/ssl /
                                break;
                        ], []
                )
-               AC_TRY_RUN(
-                       [
-                               #include <ssl/rsa.h>
-                               #include <ssl/bn.h>
-                               #include <ssl/sha.h>
-                               int main(void) 
-                               {
-                                       RSA *key; char a[2048],b[2048];;
-                                       memset(a, 0, sizeof(a));memset(b, 0, sizeof(b));
-                                       RAND_seed(a, sizeof(a));
-                                       key=RSA_generate_key(32,3,NULL,NULL);
-                                       if (key==NULL) return(1);
-                                       return(-1==RSA_private_decrypt(RSA_size(key),a,b,key,RSA_NO_PADDING));
-                               }
-                       ],
-                       [
-                               AC_DEFINE(HAVE_SSL)
-                               found_crypto=1
-                               break;
-                       ], []
-               )
        done
 
        if test ! -z "$found_crypto" ; then
index dc01a5958327bdb1ec9fbcf1e15621d49b89283d..f3a1641965af7ff61333e282274ad2e4647b8483 100644 (file)
--- a/entropy.c
+++ b/entropy.c
 #include "ssh.h"
 #include "xmalloc.h"
 
-#ifdef HAVE_OPENSSL
-# include <openssl/rand.h>
-# include <openssl/sha.h>
-#endif
-#ifdef HAVE_SSL
-# include <ssl/rand.h>
-# include <ssl/sha.h>
-#endif
+#include <openssl/rand.h>
+#include <openssl/sha.h>
 
 RCSID("$Id$");
 
index 57728482cd534ce6f9a1d3847baa92375a501bd5..88d99bfc16c72fb988664b125322994371f870b2 100644 (file)
@@ -32,12 +32,7 @@ RCSID("$Id$");
 
 #include "ssh.h"
 #include "xmalloc.h"
-#ifdef HAVE_OPENSSL
 #include <openssl/md5.h>
-#endif
-#ifdef HAVE_SSL
-#include <ssl/md5.h>
-#endif
 
 #define FPRINT "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x"
 
index b027075afad172c754947c8ad21845e4d991a9f9..29efe5656a13d0a59061149e836b75b3c3f79455 100644 (file)
 #include "includes.h"
 RCSID("$OpenBSD: hostfile.c,v 1.16 2000/04/14 10:30:31 markus Exp $");
 
-#ifdef HAVE_OPENSSL
-#include <openssl/bn.h>
-#include <openssl/rsa.h>
-#include <openssl/dsa.h>
-#endif
-#ifdef HAVE_SSL
-#include <ssl/bn.h>
-#include <ssl/rsa.h>
-#include <ssl/dsa.h>
-#endif
-
 #include "packet.h"
 #include "match.h"
 #include "ssh.h"
+#include <openssl/rsa.h>
+#include <openssl/dsa.h>
 #include "key.h"
 #include "hostfile.h"
 
index 51226676237437924c4e0075368fa844fcd43481..1a0e76f39c0ff7f7dd8ba70691106420b1ca4f7e 100644 (file)
@@ -108,6 +108,9 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
 #include "fake-getnameinfo.h"
 #include "fake-socket.h"
 
+/* Entropy collection */
+#include "entropy.h"
+
 /* Define this to be the path of the xauth program. */
 #ifndef XAUTH_PATH
 #define XAUTH_PATH "/usr/X11R6/bin/xauth"
diff --git a/kex.h b/kex.h
index 29e1e887fb15b1112cc5c234fc3167668ca355b8..5395ebc3f085c218b673e7ce0c76c4cc1e00e69f 100644 (file)
--- a/kex.h
+++ b/kex.h
 #ifndef KEX_H
 #define KEX_H
 
-#include "config.h"
-
-#ifdef HAVE_OPENSSL
-# include <openssl/bn.h>
-# include <openssl/evp.h>
-#endif
-#ifdef HAVE_SSL
-# include <ssl/bn.h>
-# include <ssl/evp.h>
-#endif
-
 #define        KEX_DH1 "diffie-hellman-group1-sha1"
 #define KEX_DSS        "ssh-dss"
 
diff --git a/key.c b/key.c
index 437a5e2457f6b3e175d395a261a3c459b3c7248d..872313abc296069b8a1e00ba1a2155c287a3c4b9 100644 (file)
--- a/key.c
+++ b/key.c
  */
 
 #include "includes.h"
-
-#ifdef HAVE_OPENSSL
-#include <openssl/bn.h>
+#include "ssh.h"
 #include <openssl/rsa.h>
 #include <openssl/dsa.h>
 #include <openssl/evp.h>
-#endif
-#ifdef HAVE_SSL
-#include <ssl/bn.h>
-#include <ssl/rsa.h>
-#include <ssl/dsa.h>
-#include <ssl/evp.h>
-#endif
-
-#include "ssh.h"
 #include "xmalloc.h"
 #include "key.h"
 
index 16bcf33a13696c2acb6253ab719df44c8e6eafa6..a9f0f26dd1c78fd1edf25d5380b28a2bc10e03d5 100644 (file)
 
 #include <unistd.h>
 #include <string.h>
-
-#ifdef HAVE_OPENSSL
 #include <openssl/md5.h>
-#endif
-
-#ifdef HAVE_SSL
-#include <ssl/md5.h>
-#endif
 
 static unsigned char itoa64[] =                /* 0 ... 63 => ascii - 64 */
        "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
diff --git a/mpaux.c b/mpaux.c
index 21109083f324e75cd39c5ae81f1b880f764f217e..4c8ee5ab28d3bf5e8defb754c4a4fa239228e7d4 100644 (file)
--- a/mpaux.c
+++ b/mpaux.c
 #include "includes.h"
 RCSID("$Id$");
 
+#include <openssl/bn.h>
 #include "getput.h"
 #include "xmalloc.h"
 
-#ifdef HAVE_OPENSSL
-#include <openssl/bn.h>
 #include <openssl/md5.h>
-#endif
-#ifdef HAVE_SSL
-#include <ssl/bn.h>
-#include <ssl/md5.h>
-#endif
 
 void
 compute_session_id(unsigned char session_id[16],
index 4000698c7520783f353ec0b77793b2096037965c..6ff6417a8ce74c0f530a802507db08e2514b756e 100644 (file)
--- a/packet.c
+++ b/packet.c
 #include "includes.h"
 RCSID("$Id$");
 
-#ifdef HAVE_OPENSSL
-# include <openssl/bn.h>
-# include <openssl/dh.h>
-# include <openssl/hmac.h>
-#endif /* HAVE_OPENSSL */
-#ifdef HAVE_SSL
-# include <ssl/bn.h>
-# include <ssl/dh.h>
-# include <ssl/hmac.h>
-#endif /* HAVE_SSL */
-
 #include "xmalloc.h"
 #include "buffer.h"
 #include "packet.h"
@@ -46,6 +35,9 @@ RCSID("$Id$");
 #include "compat.h"
 #include "ssh2.h"
 
+#include <openssl/bn.h>
+#include <openssl/dh.h>
+#include <openssl/hmac.h>
 #include "buffer.h"
 #include "kex.h"
 #include "hmac.h"
index 19d962745a43206341fd8bb68633db931aac155e..86647f6ac1e75bc10995321ed4491e8aab5670e8 100644 (file)
--- a/packet.h
+++ b/packet.h
 #ifndef PACKET_H
 #define PACKET_H
 
-#ifdef HAVE_OPENSSL
 #include <openssl/bn.h>
-#endif
-#ifdef HAVE_SSL
-#include <ssl/bn.h>
-#endif
 
 /*
  * Sets the socket used for communication.  Disables encryption until
diff --git a/rsa.h b/rsa.h
index 252a910c22ba0ed33d38f9c3225f307907e6673b..bbe19cfa6038f67d03aa1398dd14615a369942b0 100644 (file)
--- a/rsa.h
+++ b/rsa.h
 #ifndef RSA_H
 #define RSA_H
 
-#include "config.h"
-
-#ifdef HAVE_OPENSSL
 #include <openssl/bn.h>
 #include <openssl/rsa.h>
-#include <openssl/rand.h>
-#endif
-
-#ifdef HAVE_SSL
-#include <ssl/bn.h>
-#include <ssl/rsa.h>
-#include <ssl/rand.h>
-#endif
 
 /* Calls SSL RSA_generate_key, only copies to prv and pub */
 void    rsa_generate_key(RSA * prv, RSA * pub, unsigned int bits);
index 8d8ff223ec7d0861641ccc614bafa8565ce656ec..24bc25c6f1a40d564d46d81280bc268a6e8a6002 100644 (file)
--- a/session.c
+++ b/session.c
@@ -1247,6 +1247,8 @@ session_pty_req(Session *s)
        /* Get window size from the packet. */
        pty_change_window_size(s->ptyfd, s->row, s->col, s->xpixel, s->ypixel);
 
+       /* XXX parse and set terminal modes */
+       xfree(term_modes);
        return 1;
 }
 
@@ -1286,6 +1288,7 @@ session_input_channel_req(int id, void *arg)
                        success = 1;
                } else if (strcmp(rtype, "exec") == 0) {
                        char *command = packet_get_string(&len);
+                       packet_done();
                        if (s->ttyfd == -1)
                                do_exec_no_pty(s, command, s->pw);
                        else
@@ -1293,8 +1296,7 @@ session_input_channel_req(int id, void *arg)
                        xfree(command);
                        success = 1;
                } else if (strcmp(rtype, "pty-req") == 0) {
-                       if (session_pty_req(s) > 0)
-                               success = 1;
+                       success =  session_pty_req(s);
                }
        }
        if (strcmp(rtype, "window-change") == 0) {
index 66439461ea253554f2503236b2b5dbf948c6e888..fac2a2c38d3684267902ca76dde3736bc7d5c1ea 100644 (file)
@@ -21,12 +21,7 @@ RCSID("$OpenBSD: ssh-agent.c,v 1.28 2000/04/14 10:30:33 markus Exp $");
 #include "getput.h"
 #include "mpaux.h"
 
-#ifdef HAVE_OPENSSL
 #include <openssl/md5.h>
-#endif
-#ifdef HAVE_SSL
-#include <ssl/md5.h>
-#endif
 
 typedef struct {
        int fd;
index bca0bf43afdb88fb56222ad208688ac3baa62c73..3c5c990f2069be7125b244c777054b03c56197bc 100644 (file)
 #include "includes.h"
 RCSID("$OpenBSD: sshconnect.c,v 1.68 2000/04/14 10:30:33 markus Exp $");
 
-#ifdef HAVE_OPENSSL
 #include <openssl/bn.h>
-#include <openssl/rsa.h>
-#include <openssl/dsa.h>
-#include <openssl/md5.h>
-#endif
-#ifdef HAVE_SSL
-#include <ssl/bn.h>
-#include <ssl/rsa.h>
-#include <ssl/dsa.h>
-#include <ssl/md5.h>
-#endif
-
 #include "xmalloc.h"
 #include "rsa.h"
 #include "ssh.h"
@@ -38,8 +26,13 @@ RCSID("$OpenBSD: sshconnect.c,v 1.68 2000/04/14 10:30:33 markus Exp $");
 #include "readconf.h"
 
 #include "bufaux.h"
+#include <openssl/rsa.h>
+#include <openssl/dsa.h>
 
 #include "ssh2.h"
+#include <openssl/md5.h>
+#include <openssl/dh.h>
+#include <openssl/hmac.h>
 #include "kex.h"
 #include "myproposal.h"
 #include "key.h"
diff --git a/sshd.c b/sshd.c
index cc6bee96a9c101ba3aa1a570e3ab82ecc1c4c4d7..c8508e931ac882f7df7b4cb27b2f2595ed289acd 100644 (file)
--- 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 $");
 #include "buffer.h"
 
 #include "ssh2.h"
-#ifdef HAVE_OPENSSL
-# include <openssl/dh.h>
-# include <openssl/bn.h>
-# include <openssl/hmac.h>
-# include <openssl/dsa.h>
-# include <openssl/rsa.h>
-#endif
-#ifdef HAVE_SSL
-# include <ssl/dh.h>
-# include <ssl/bn.h>
-# include <ssl/hmac.h>
-# include <ssl/dsa.h>
-# include <ssl/rsa.h>
-#endif
+#include <openssl/dh.h>
+#include <openssl/bn.h>
+#include <openssl/hmac.h>
 #include "kex.h"
+#include <openssl/dsa.h>
+#include <openssl/rsa.h>
 #include "key.h"
 #include "dsa.h"
 
This page took 0.390145 seconds and 5 git commands to generate.