+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]
/* 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
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)
#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"
#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;
#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 % */
#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. */
#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"
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"
/*
* Returns an integer from the buffer (4 bytes, msb first).
*/
-unsigned int
+unsigned int
buffer_get_int(Buffer *buffer)
{
unsigned char buf[4];
/*
* Stores an integer in the buffer in 4 bytes, msb first.
*/
-void
+void
buffer_put_int(Buffer *buffer, unsigned int value)
{
char buf[4];
/*
* 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));
/*
* Returns a character from the buffer (0 - 255).
*/
-int
+int
buffer_get_char(Buffer *buffer)
{
char ch;
/*
* Stores a character in the buffer.
*/
-void
+void
buffer_put_char(Buffer *buffer, int value)
{
char ch = value;
/*
- *
+ *
* 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$"); */
#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:
#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. */
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
#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$");
#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"
#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"
#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"
#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"
*/
#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"
#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";
#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],
#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"
#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"
#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
#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);
/* 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;
}
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
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) {
#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;
#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"
#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"
#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"