Compare commits

...
10 Commits
Author SHA1 Message Date
Damien Miller 95e8963429 idoh 2000-05-09 15:28:50 +10:00
Damien Miller 75edac3366 - Cleanup of bsd-base64 headers, bugfix definitions of __b64_*. Reported
by Andre Lucas <[email protected]>
2000-05-09 15:28:41 +10:00
Damien Miller 2a44f8938d bad checkin mode 2000-05-09 15:05:45 +10:00
Damien Miller 82f88755e9 Bad checkin mode 2000-05-09 15:05:25 +10:00
Damien Miller 17194ca147 update specs 2000-05-09 15:04:39 +10:00
Damien Miller 54057c2b9b - Doc updates 2000-05-09 15:03:37 +10:00
Damien Miller 0e963ef3c5 oops - missed this 2000-05-09 14:45:00 +10:00
Damien Miller 16e519cb9c - Moved all the bsd-* and fake-* stuff into new libopenbsd-compat.a 2000-05-09 14:28:55 +10:00
Damien Miller 30c3d42930 - OpenBSD CVS update
- [email protected]
    [cipher.h myproposal.h readconf.c readconf.h servconf.c ssh.1 ssh.c]
    [ssh.h sshconnect1.c sshconnect2.c sshd.8]
    - complain about invalid ciphers in SSH1 (e.g. arcfour is SSH2 only)
  - [email protected]
    [ssh.1]
    - zap typo
    [ssh-keygen.1]
    - One last nit fix. (markus approved)
    [sshd.8]
    - some markus certified spelling adjustments
  - [email protected]
    [auth2.c channels.c clientloop.c compat compat.h dsa.c kex.c]
    [sshconnect2.c ]
    - bug compat w/ ssh-2.0.13 x11, split out bugs
    [nchan.c]
    - no drain if ibuf_empty, fixes x11fwd problems; tests by fries@
    [ssh-keygen.c]
    - handle escapes in real and original key format, ok millert@
    [version.h]
    - OpenSSH-2.1
2000-05-09 11:02:59 +10:00
Damien Miller 61e50f10c2 - Configure caching and cleanup patch from Andre Lucas'
<[email protected]>
2000-05-08 20:49:37 +10:00
36 changed files with 511 additions and 388 deletions

No files matched your search

+31
View File
@@ -1,3 +1,31 @@
20000509
- OpenBSD CVS update
- [email protected]
[cipher.h myproposal.h readconf.c readconf.h servconf.c ssh.1 ssh.c]
[ssh.h sshconnect1.c sshconnect2.c sshd.8]
- complain about invalid ciphers in SSH1 (e.g. arcfour is SSH2 only)
- [email protected]
[ssh.1]
- zap typo
[ssh-keygen.1]
- One last nit fix. (markus approved)
[sshd.8]
- some markus certified spelling adjustments
- [email protected]
[auth2.c channels.c clientloop.c compat compat.h dsa.c kex.c]
[sshconnect2.c ]
- bug compat w/ ssh-2.0.13 x11, split out bugs
[nchan.c]
- no drain if ibuf_empty, fixes x11fwd problems; tests by fries@
[ssh-keygen.c]
- handle escapes in real and original key format, ok millert@
[version.h]
- OpenSSH-2.1
- Moved all the bsd-* and fake-* stuff into new libopenbsd-compat.a
- Doc updates
- Cleanup of bsd-base64 headers, bugfix definitions of __b64_*. Reported
by Andre Lucas <[email protected]>
20000508
- Makefile and RPM spec fixes
- Generate DSA host keys during "make key" or RPM installs
@@ -9,6 +37,9 @@
- interop w/ SecureFX
- Release 2.0.0beta2
- Configure caching and cleanup patch from Andre Lucas'
<[email protected]>
20000507
- Remove references to SSLeay.
- Big OpenBSD CVS update
+5 -10
View File
@@ -29,12 +29,8 @@ passphrase requester. This is maintained separately at:
http://www.ntrnet.net/~jmknoble/software/x11-ssh-askpass/index.html
If you are planning to use OpenSSH on a Unix which lacks a Kernel random
number generator (/dev/urandom), you may want to install the Entropy
Gathering Daemon (or similar). You will also need to specify the
--with-egd-pool option to ./configure. OpenSSH 2.0 includes some
peliminary built-in randomness collection, but it is not as well
tested as EGD.
The Entropy Gathering Daemon (EGD) is supported if you have a system which
lacks /dev/random and don't want to use OpenSSH's internal entropy collection.
EGD:
http://www.lothar.com/tech/crypto/
@@ -98,10 +94,9 @@ random numbers (the default is /dev/urandom). Unless you are absolutly
sure of what you are doing, it is best to leave this alone.
--with-egd-pool=/some/file allows you to enable Entropy Gathering
Daemon support and to specify a EGD pool socket. You may want to
use this if your Unix does not support the /dev/urandom device (or
similar). The file argument refers to the EGD pool file, not the
EGD program itself. Please refer to the EGD documentation.
Daemon support and to specify a EGD pool socket. Use this if your
Unix lacks /dev/random and you don't want to use OpenSSH's builtin
entropy collection support.
--with-lastlog=FILE will specify the location of the lastlog file.
./configure searches a few locations for lastlog, but may not find
+24 -16
View File
@@ -33,7 +33,9 @@ INSTALL_SSH_PRNG_CMDS=@INSTALL_SSH_PRNG_CMDS@
TARGETS=ssh sshd ssh-add ssh-keygen ssh-agent scp $(EXTRA_TARGETS)
LIBOBJS= atomicio.o authfd.o authfile.o bsd-base64.o bsd-bindresvport.o bsd-daemon.o bsd-misc.o bsd-mktemp.o bsd-rresvport.o bsd-setenv.o bsd-snprintf.o bsd-strlcat.o bsd-strlcpy.o bufaux.o buffer.o canohost.o channels.o cipher.o compat.o compress.o crc32.o deattack.o dispatch.o dsa.o fake-getaddrinfo.o fake-getnameinfo.o fingerprint.o hmac.o hostfile.o key.o kex.o log.o match.o mpaux.o nchan.o packet.o radix.o entropy.o readpass.o rsa.o tildexpand.o ttymodes.o uidswap.o uuencode.o xmalloc.o
LIBSSH_OBJS=atomicio.o authfd.o authfile.o bufaux.o buffer.o canohost.o channels.o cipher.o compat.o compress.o crc32.o deattack.o dispatch.o dsa.o fingerprint.o hmac.o hostfile.o key.o kex.o log.o match.o mpaux.o nchan.o packet.o radix.o entropy.o readpass.o rsa.o tildexpand.o ttymodes.o uidswap.o uuencode.o xmalloc.o
LIBOPENBSD_COMPAT_OBJS=bsd-base64.o bsd-bindresvport.o bsd-daemon.o bsd-misc.o bsd-mktemp.o bsd-rresvport.o bsd-setenv.o bsd-snprintf.o bsd-strlcat.o bsd-strlcpy.o fake-getaddrinfo.o fake-getnameinfo.o
SSHOBJS= ssh.o sshconnect.o sshconnect1.o sshconnect2.o log-client.o readconf.o clientloop.o
@@ -53,29 +55,35 @@ all: $(TARGETS) $(CONFIGFILES)
manpages: $(MANPAGES)
$(LIBOBJS): config.h
$(LIBSSH_OBJS): config.h
libssh.a: $(LIBOBJS)
$(AR) rv $@ $(LIBOBJS)
$(LIBOPENBSD_COMPAT_OBJS): config.h
libopenbsd-compat.a: $(LIBOPENBSD_COMPAT_OBJS)
$(AR) rv $@ $(LIBOPENBSD_COMPAT_OBJS)
$(RANLIB) $@
ssh: libssh.a $(SSHOBJS)
$(LD) -o $@ $(SSHOBJS) $(LDFLAGS) -lssh $(LIBS)
libssh.a: $(LIBSSH_OBJS)
$(AR) rv $@ $(LIBSSH_OBJS)
$(RANLIB) $@
sshd: libssh.a $(SSHDOBJS)
$(LD) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh $(LIBS)
ssh: libopenbsd-compat.a libssh.a $(SSHOBJS)
$(LD) -o $@ $(SSHOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
scp: libssh.a scp.o
$(LD) -o $@ scp.o $(LDFLAGS) -lssh $(LIBS)
sshd: libssh.a libopenbsd-compat.a $(SSHDOBJS)
$(LD) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
ssh-add: libssh.a ssh-add.o log-client.o
$(LD) -o $@ ssh-add.o log-client.o $(LDFLAGS) -lssh $(LIBS)
scp: libopenbsd-compat.a libssh.a scp.o
$(LD) -o $@ scp.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
ssh-agent: libssh.a ssh-agent.o log-client.o
$(LD) -o $@ ssh-agent.o log-client.o $(LDFLAGS) -lssh $(LIBS)
ssh-add: libopenbsd-compat.a libssh.a ssh-add.o log-client.o
$(LD) -o $@ ssh-add.o log-client.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
ssh-keygen: libssh.a ssh-keygen.o log-client.o
$(LD) -o $@ ssh-keygen.o log-client.o $(LDFLAGS) -lssh $(LIBS)
ssh-agent: libopenbsd-compat.a libssh.a ssh-agent.o log-client.o
$(LD) -o $@ ssh-agent.o log-client.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
ssh-keygen: libopenbsd-compat.a libssh.a ssh-keygen.o log-client.o
$(LD) -o $@ ssh-keygen.o log-client.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
$(MANPAGES) $(CONFIGFILES)::
$(FIXPATHSCMD) $(srcdir)/$@
+10 -15
View File
@@ -3,11 +3,11 @@
[ Thanks to HARUYAMA Seigo <[email protected]>
******* IMPORTANT
* On systmes which lack a /dev/random driver, this port of
* OpenSSH-1.2.2 was not correctly seeding OpenSSL's random number
* On systmes which lack a /dev/random driver, version of this port
* prior to 1.2.2 were not correctly seeding OpenSSL's random number
* pool. This resulted in lower quality RSA keys being generated. If
* you generated host or user keys with v1.2.2, please generate new
* ones using a more recent version.
* you generated host or user keys with v1.2.2 or previous versions,
* please generate new ones using a more recent version.
This is the port of OpenBSD's excellent OpenSSH to Linux and other
Unices.
@@ -21,20 +21,17 @@ Markus Friedl, Niels Provos, Theo de Raadt, and Dug Song. It has a
homepage at http://www.openssh.com/
This port consists of the re-introduction of autoconf support, PAM
support (for Linux and Solaris), EGD[1] support, SOCKS support (using
the Dante [6] libraries and replacements for OpenBSD library functions
that are (regrettably) absent from other unices. This port has been
best tested on Linux, Solaris, HPUX, NetBSD and Irix. Support for AIX,
SCO, NeXT and other Unices is underway. This version actively tracks
changes in the OpenBSD CVS repository.
support (for Linux and Solaris), EGD[1] support and replacements for
OpenBSD library functions that are (regrettably) absent from other
unices. This port has been best tested on Linux, Solaris, HPUX, NetBSD
and Irix. Support for AIX, SCO, NeXT and other Unices is underway.
This version actively tracks changes in the OpenBSD CVS repository.
The PAM support is now more functional than the popular packages of
commercial ssh-1.2.x. It checks "account" and "session" modules for
all logins, not just when using password authentication.
OpenSSH depends on Zlib[2], OpenSSL[3] and optionally PAM[4] and
Dante[6]. To build the GNOME[5] pass-phrase requester
(--with-gnome-askpass), you will need the GNOME libraries installed.
OpenSSH depends on Zlib[2], OpenSSL[3] and optionally PAM[4].
There is now several mailing lists for this port of OpenSSH. Please
refer to http://violet.ibs.com.au/openssh/list.html for details on how
@@ -63,6 +60,4 @@ References -
[2] http://www.cdrom.com/pub/infozip/zlib/
[3] http://www.openssl.org/
[4] http://www.kernel.org/pub/linux/libs/pam/ (PAM is standard on Solaris)
[5] http://www.gnome.org/
[6] http://www.inet.no/dante
-2
View File
@@ -7,8 +7,6 @@
- Replace the horror in acconfig.h which tries to comphensate for the
lack of u_intXX_t types. There must be a better way.
- Move all compatability cruft (bsd-*, fake-*) into subordinate library
- Cleanup configure.in
- Load / write random seed on startup / exit
Vendored
+35 -5
View File
@@ -1,15 +1,45 @@
dnl $Id: aclocal.m4,v 1.1 2000/05/01 23:57:51 damien Exp $
dnl $Id: aclocal.m4,v 1.2 2000/05/08 10:49:37 damien Exp $
dnl
dnl OpenSSH-specific autoconf macros
dnl
dnl AC_PATH_ENTROPY_PROG(variablename, command):
dnl OSSH_CHECK_HEADER_FOR_FIELD(field, header, symbol)
dnl Does AC_EGREP_HEADER on 'header' for the string 'field'
dnl If found, set 'symbol' to be defined. Cache the result.
dnl TODO: This is not foolproof, better to compile and read from there
AC_DEFUN(OSSH_CHECK_HEADER_FOR_FIELD, [
# look for field '$1' in header '$2'
dnl This strips characters illegal to m4 from the header filename
ossh_safe=`echo "$2" | sed 'y%./+-%__p_%'`
dnl
ossh_varname="ossh_cv_$ossh_safe""_has_"$1
AC_MSG_CHECKING(for $1 field in $2)
AC_CACHE_VAL($ossh_varname, [
AC_EGREP_HEADER($1, $2, [ dnl
eval "$ossh_varname=yes" dnl
], [ dnl
eval "$ossh_varname=no" dnl
]) dnl
])
ossh_result=`eval "echo "$"$ossh_varname"`
if test -n "`echo $ossh_varname`"; then
AC_MSG_RESULT($ossh_result)
if test "x$ossh_result" = "xyes"; then
AC_DEFINE($3)
fi
else
AC_MSG_RESULT(no)
fi
])
dnl OSSH_PATH_ENTROPY_PROG(variablename, command):
dnl Tidiness function, sets 'undef' if not found, and does the AC_SUBST
AC_DEFUN(AC_PATH_ENTROPY_PROG, [
AC_PATH_PROG([$1], [$2])
AC_DEFUN(OSSH_PATH_ENTROPY_PROG, [
AC_PATH_PROG($1, $2)
if test -z "[$]$1" ; then
$1="undef"
fi
AC_SUBST([$1])
AC_SUBST($1)
])
+5 -1
View File
@@ -27,7 +27,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "includes.h"
RCSID("$OpenBSD: auth2.c,v 1.7 2000/05/06 17:45:36 markus Exp $");
RCSID("$OpenBSD: auth2.c,v 1.8 2000/05/08 17:42:24 markus Exp $");
#include <openssl/dsa.h>
#include <openssl/rsa.h>
@@ -278,6 +278,10 @@ ssh2_auth_pubkey(struct passwd *pw, unsigned char *raw, unsigned int rlen)
debug("pubkey auth disabled");
return 0;
}
if (datafellows & SSH_BUG_PUBKEYAUTH) {
log("bug compatibility with ssh-2.0.13 pubkey not implemented");
return 0;
}
have_sig = packet_get_char();
pkalg = packet_get_string(&alen);
if (strcmp(pkalg, KEX_DSS) != 0) {
+4 -3
View File
@@ -44,7 +44,7 @@
#include "config.h"
#ifndef HAVE_B64_NTOP
#if !defined(HAVE_B64_NTOP) && !defined(HAVE___B64_NTOP)
#include <sys/types.h>
#include <sys/param.h>
@@ -53,12 +53,13 @@
#include <arpa/inet.h>
#include <ctype.h>
#include <resolv.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "bsd-base64.h"
#define Assert(Cond) if (!(Cond)) abort()
static const char Base64[] =
@@ -312,4 +313,4 @@ b64_pton(char const *src, u_char *target, size_t targsize)
return (tarindex);
}
#endif /* HAVE_B64_NTOP */
#endif /* !defined(HAVE_B64_NTOP) && !defined(HAVE___B64_NTOP) */
+4 -7
View File
@@ -4,16 +4,13 @@
#include "config.h"
#ifndef HAVE___B64_NTOP
# ifdef HAVE_B64_NTOP
# define __b64_ntop b64_ntop
# define __b64_pton b64_pton
# else /* !HAVE_B64_NTOP */
# ifndef HAVE_B64_NTOP
int b64_ntop(u_char const *src, size_t srclength, char *target,
size_t targsize);
int b64_pton(char const *src, u_char *target, size_t targsize);
# endif /* HAVE_B64_NTOP */
# endif /* !HAVE_B64_NTOP */
# define __b64_ntop b64_ntop
# define __b64_pton b64_pton
#endif /* HAVE___B64_NTOP */
#endif /* _BSD_BINRESVPORT_H */
+10 -3
View File
@@ -17,7 +17,7 @@
*/
#include "includes.h"
RCSID("$Id: channels.c,v 1.29 2000/05/07 02:03:15 damien Exp $");
RCSID("$Id: channels.c,v 1.30 2000/05/09 01:02:59 damien Exp $");
#include "ssh.h"
#include "packet.h"
@@ -505,7 +505,10 @@ channel_pre_x11_open(Channel *c, fd_set * readset, fd_set * writeset)
int ret = x11_open_helper(c);
if (ret == 1) {
c->type = SSH_CHANNEL_OPEN;
channel_pre_open_15(c, readset, writeset);
if (compat20)
channel_pre_open_20(c, readset, writeset);
else
channel_pre_open_15(c, readset, writeset);
} else if (ret == -1) {
debug("X11 rejected %d i%d/o%d", c->self, c->istate, c->ostate);
chan_read_failed(c); /** force close? */
@@ -549,7 +552,11 @@ channel_post_x11_listener(Channel *c, fd_set * readset, fd_set * writeset)
packet_put_int(c->local_maxpacket);
/* originator host and port */
packet_put_cstring(remote_hostname);
packet_put_int(remote_port);
if (datafellows & SSH_BUG_X11FWD) {
debug("ssh2 x11 bug compat mode");
} else {
packet_put_int(remote_port);
}
packet_send();
} else {
packet_start(SSH_SMSG_X11_OPEN);
+2 -1
View File
@@ -11,7 +11,7 @@
*
*/
/* RCSID("$Id: cipher.h,v 1.12 2000/04/16 02:31:50 damien Exp $"); */
/* RCSID("$Id: cipher.h,v 1.13 2000/05/09 01:03:00 damien Exp $"); */
#ifndef CIPHER_H
#define CIPHER_H
@@ -23,6 +23,7 @@
/* Cipher types. New types can be added, but old types should not be removed
for compatibility. The maximum allowed value is 31. */
#define SSH_CIPHER_ILLEGAL -2 /* No valid cipher selected. */
#define SSH_CIPHER_NOT_SET -1 /* None selected (invalid number). */
#define SSH_CIPHER_NONE 0 /* no encryption */
#define SSH_CIPHER_IDEA 1 /* IDEA CFB */
+4 -4
View File
@@ -16,7 +16,7 @@
*/
#include "includes.h"
RCSID("$Id: clientloop.c,v 1.15 2000/05/08 03:44:53 damien Exp $");
RCSID("$Id: clientloop.c,v 1.16 2000/05/09 01:03:00 damien Exp $");
#include "xmalloc.h"
#include "ssh.h"
@@ -979,11 +979,11 @@ client_input_channel_open(int type, int plen)
char *originator;
int originator_port;
originator = packet_get_string(NULL);
if (packet_remaining() > 0) {
originator_port = packet_get_int();
} else {
if (datafellows & SSH_BUG_X11FWD) {
debug("buggy server: x11 request w/o originator_port");
originator_port = 0;
} else {
originator_port = packet_get_int();
}
packet_done();
/* XXX check permission */
+12 -9
View File
@@ -28,7 +28,7 @@
*/
#include "includes.h"
RCSID("$Id: compat.c,v 1.9 2000/04/29 13:57:10 damien Exp $");
RCSID("$Id: compat.c,v 1.10 2000/05/09 01:03:00 damien Exp $");
#include "ssh.h"
#include "packet.h"
@@ -57,17 +57,20 @@ compat_datafellows(const char *version)
{
int i;
size_t len;
static const char *check[] = {
"2.0.1",
"2.1.0",
NULL
struct {
char *version;
int bugs;
} check[] = {
{"2.1.0", SSH_BUG_SIGBLOB|SSH_BUG_HMAC},
{"2.0.1", SSH_BUG_SIGBLOB|SSH_BUG_HMAC|SSH_BUG_PUBKEYAUTH|SSH_BUG_X11FWD},
{NULL, 0}
};
for (i = 0; check[i]; i++) {
len = strlen(check[i]);
for (i = 0; check[i].version; i++) {
len = strlen(check[i].version);
if (strlen(version) >= len &&
(strncmp(version, check[i], len) == 0)) {
(strncmp(version, check[i].version, len) == 0)) {
verbose("datafellows: %.200s", version);
datafellows = 1;
datafellows = check[i].bugs;
return;
}
}
+6 -1
View File
@@ -26,7 +26,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* RCSID("$Id: compat.h,v 1.5 2000/04/12 10:17:39 damien Exp $"); */
/* RCSID("$Id: compat.h,v 1.6 2000/05/09 01:03:00 damien Exp $"); */
#ifndef COMPAT_H
#define COMPAT_H
@@ -36,6 +36,11 @@
#define SSH_PROTO_1_PREFERRED 0x02
#define SSH_PROTO_2 0x04
#define SSH_BUG_SIGBLOB 0x01
#define SSH_BUG_PUBKEYAUTH 0x02
#define SSH_BUG_HMAC 0x04
#define SSH_BUG_X11FWD 0x08
void enable_compat13(void);
void enable_compat20(void);
void compat_datafellows(const char *s);
+230 -235
View File
@@ -196,28 +196,29 @@ saved_CFLAGS="$CFLAGS"
if test "x$prefix" != "xNONE" ; then
tryssldir="$tryssldir $prefix"
fi
AC_MSG_CHECKING([for OpenSSL directory])
for ssldir in "" $tryssldir /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do
if test ! -z "$ssldir" ; then
LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
CFLAGS="$saved_CFLAGS -I$ssldir/include"
if test ! -z "$need_dash_r" ; then
LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir"
fi
else
LDFLAGS="$saved_LDFLAGS"
fi
AC_CACHE_CHECK([for OpenSSL directory], ac_cv_openssldir, [
for WANTS_RSAREF in "" 1 ; do
if test -z "$WANTS_RSAREF" ; then
LIBS="$saved_LIBS -lcrypto"
for ssldir in "" $tryssldir /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do
if test ! -z "$ssldir" ; then
LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
CFLAGS="$saved_CFLAGS -I$ssldir/include"
if test ! -z "$need_dash_r" ; then
LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir"
fi
else
LIBS="$saved_LIBS -lcrypto -lRSAglue -lrsaref"
LDFLAGS="$saved_LDFLAGS"
fi
AC_TRY_RUN(
[
for WANTS_RSAREF in "" 1 ; do
if test -z "$WANTS_RSAREF" ; then
LIBS="$saved_LIBS -lcrypto"
else
LIBS="$saved_LIBS -lcrypto -lRSAglue -lrsaref"
fi
AC_TRY_RUN(
[
#include <string.h>
#include <openssl/rand.h>
#include <openssl/rsa.h>
@@ -232,26 +233,33 @@ int main(void)
if (key==NULL) return(1);
return(-1==RSA_private_decrypt(RSA_size(key),a,b,key,RSA_NO_PADDING));
}
],
[
AC_DEFINE(HAVE_OPENSSL)
found_crypto=1
break;
], []
)
],
[
found_crypto=1
break;
], []
)
done
if test ! -z "$found_crypto" ; then
break;
fi
done
if test ! -z "$found_crypto" ; then
break;
if test -z "$found_crypto" ; then
AC_MSG_ERROR([Could not find working SSLeay / OpenSSL libraries, please install])
fi
if test -z "$ssldir" ; then
ssldir="(system)"
fi
done
if test -z "$found_crypto" ; then
AC_MSG_ERROR([Could not find working SSLeay / OpenSSL libraries, please install])
fi
if test -z "$ssldir" ; then
ssldir="(system)"
else
ac_cv_openssldir=$ssldir
])
if test ! -z "$ac_cv_openssldir" -a ! "x$ac_cv_openssldir" = "x(system)" ; then
AC_DEFINE(HAVE_OPENSSL)
dnl Need to recover ssldir - test above runs in subshell
ssldir=$ac_cv_openssldir
CFLAGS="$saved_CFLAGS -I$ssldir/include"
LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
if test ! -z "$need_dash_r" ; then
@@ -266,7 +274,7 @@ if test -z "$WANTS_RSAREF" ; then
else
LIBS="$saved_LIBS -lcrypto -lRSAglue -lrsaref"
fi
AC_MSG_RESULT($ssldir)
# Checks for data types
AC_CHECK_SIZEOF(char, 1)
@@ -276,36 +284,41 @@ AC_CHECK_SIZEOF(long int, 4)
AC_CHECK_SIZEOF(long long int, 8)
# More checks for data types
AC_MSG_CHECKING([for intXX_t types])
AC_TRY_COMPILE(
[#include <sys/types.h>],
[int8_t a; int16_t b; int32_t c; a = b = c = 1;],
[
AC_DEFINE(HAVE_INTXX_T)
AC_MSG_RESULT(yes)
have_intxx_t=1
],
[AC_MSG_RESULT(no)]
)
AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
AC_TRY_COMPILE(
[ #include <sys/types.h> ],
[ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
[ ac_cv_have_intxx_t="yes" ],
[ ac_cv_have_intxx_t="no" ]
)
])
if test "x$ac_cv_have_intxx_t" = "xyes" ; then
AC_DEFINE(HAVE_INTXX_T)
have_intxx_t=1
fi
AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
AC_TRY_COMPILE(
[ #include <sys/types.h> ],
[ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
[ ac_cv_have_u_intxx_t="yes" ],
[ ac_cv_have_u_intxx_t="no" ]
)
])
if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
AC_DEFINE(HAVE_U_INTXX_T)
have_u_intxx_t=1
fi
AC_MSG_CHECKING([for u_intXX_t types])
AC_TRY_COMPILE(
[#include <sys/types.h>],
[u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
[
AC_DEFINE(HAVE_U_INTXX_T)
AC_MSG_RESULT(yes)
have_u_intxx_t=1
],
[AC_MSG_RESULT(no)]
)
if test -z "$have_u_intxx_t" -o -z "$have_intxx_t" -a \
"x$ac_cv_header_sys_bitypes_h" = "xyes"
then
AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
AC_TRY_COMPILE(
[#include <sys/bitypes.h>],
[
#include <sys/bitypes.h>
],
[
int8_t a; int16_t b; int32_t c;
u_int8_t e; u_int16_t f; u_int32_t g;
@@ -321,189 +334,171 @@ then
fi
if test -z "$have_u_intxx_t" ; then
AC_MSG_CHECKING([for uintXX_t types])
AC_TRY_COMPILE(
[#include <sys/types.h>],
[uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;],
[
AC_DEFINE(HAVE_UINTXX_T)
AC_MSG_RESULT(yes)
],
[AC_MSG_RESULT(no)]
)
AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
AC_TRY_COMPILE(
[
#include <sys/types.h>
],
[ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ],
[ ac_cv_have_uintxx_t="yes" ],
[ ac_cv_have_uintxx_t="no" ]
)
])
if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
AC_DEFINE(HAVE_UINTXX_T)
fi
fi
AC_MSG_CHECKING([for socklen_t])
AC_TRY_COMPILE(
[
AC_CACHE_CHECK([for socklen_t], ac_cv_have_socklen_t, [
AC_TRY_COMPILE(
[
#include <sys/types.h>
#include <sys/socket.h>
],
[socklen_t foo; foo = 1235;],
[
AC_DEFINE(HAVE_SOCKLEN_T)
AC_MSG_RESULT(yes)
],
[AC_MSG_RESULT(no)]
)
],
[socklen_t foo; foo = 1235;],
[ ac_cv_have_socklen_t="yes" ],
[ ac_cv_have_socklen_t="no" ]
)
])
if test "x$ac_cv_have_socklen_t" = "xyes" ; then
AC_DEFINE(HAVE_SOCKLEN_T)
fi
AC_MSG_CHECKING([for size_t])
AC_TRY_COMPILE(
[#include <sys/types.h>],
[size_t foo; foo = 1235;],
[
AC_DEFINE(HAVE_SIZE_T)
AC_MSG_RESULT(yes)
],
[AC_MSG_RESULT(no)]
)
AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
AC_TRY_COMPILE(
[
#include <sys/types.h>
],
[ size_t foo; foo = 1235; ],
[ ac_cv_have_size_t="yes" ],
[ ac_cv_have_size_t="no" ]
)
])
if test "x$ac_cv_have_size_t" = "xyes" ; then
AC_DEFINE(HAVE_SIZE_T)
fi
AC_MSG_CHECKING([for struct sockaddr_storage])
AC_TRY_COMPILE(
[
AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [
AC_TRY_COMPILE(
[
#include <sys/types.h>
#include <sys/socket.h>
],
[struct sockaddr_storage s;],
[
AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE)
AC_MSG_RESULT(yes)
],
[AC_MSG_RESULT(no)]
)
],
[ struct sockaddr_storage s; ],
[ ac_cv_have_struct_sockaddr_storage="yes" ],
[ ac_cv_have_struct_sockaddr_storage="no" ]
)
])
if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE)
fi
AC_MSG_CHECKING([for struct sockaddr_in6])
AC_TRY_COMPILE(
[#include <netinet/in.h>],
[struct sockaddr_in6 s; s.sin6_family = 0;],
[
AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6)
AC_MSG_RESULT(yes)
],
[AC_MSG_RESULT(no)]
)
AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
AC_TRY_COMPILE(
[
#include <netinet/in.h>
],
[ struct sockaddr_in6 s; s.sin6_family = 0; ],
[ ac_cv_have_struct_sockaddr_in6="yes" ],
[ ac_cv_have_struct_sockaddr_in6="no" ]
)
])
if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6)
fi
AC_MSG_CHECKING([for struct in6_addr])
AC_TRY_COMPILE(
[#include <netinet/in.h>],
[struct in6_addr s; s.s6_addr[0] = 0;],
[
AC_DEFINE(HAVE_STRUCT_IN6_ADDR)
AC_MSG_RESULT(yes)
],
[AC_MSG_RESULT(no)]
)
AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
AC_TRY_COMPILE(
[
#include <netinet/in.h>
],
[ struct in6_addr s; s.s6_addr[0] = 0; ],
[ ac_cv_have_struct_in6_addr="yes" ],
[ ac_cv_have_struct_in6_addr="no" ]
)
])
if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
AC_DEFINE(HAVE_STRUCT_IN6_ADDR)
fi
AC_MSG_CHECKING([for struct addrinfo])
AC_TRY_COMPILE(
[
AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
AC_TRY_COMPILE(
[
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
],
[struct addrinfo s; s.ai_flags = AI_PASSIVE;],
[
AC_DEFINE(HAVE_STRUCT_ADDRINFO)
AC_MSG_RESULT(yes)
],
[AC_MSG_RESULT(no)]
)
],
[ struct addrinfo s; s.ai_flags = AI_PASSIVE; ],
[ ac_cv_have_struct_addrinfo="yes" ],
[ ac_cv_have_struct_addrinfo="no" ]
)
])
if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
AC_DEFINE(HAVE_STRUCT_ADDRINFO)
fi
# Checks for structure members
AC_MSG_CHECKING([whether utmp.h has ut_host field])
AC_EGREP_HEADER(ut_host, utmp.h,
[AC_DEFINE(HAVE_HOST_IN_UTMP) AC_MSG_RESULT(yes); ],
[AC_MSG_RESULT(no)]
)
AC_MSG_CHECKING([whether utmpx.h has ut_host field])
AC_EGREP_HEADER(ut_host, utmpx.h,
[AC_DEFINE(HAVE_HOST_IN_UTMPX) AC_MSG_RESULT(yes); ],
[AC_MSG_RESULT(no)]
)
AC_MSG_CHECKING([whether utmpx.h has syslen field])
AC_EGREP_HEADER(syslen, utmpx.h,
[AC_DEFINE(HAVE_SYSLEN_IN_UTMPX) AC_MSG_RESULT(yes); ],
[AC_MSG_RESULT(no)]
)
AC_MSG_CHECKING([whether utmp.h has ut_pid field])
AC_EGREP_HEADER(ut_pid, utmp.h,
[AC_DEFINE(HAVE_PID_IN_UTMP) AC_MSG_RESULT(yes); ],
[AC_MSG_RESULT(no)]
)
AC_MSG_CHECKING([whether utmp.h has ut_type field])
AC_EGREP_HEADER(ut_type, utmp.h,
[AC_DEFINE(HAVE_TYPE_IN_UTMP) AC_MSG_RESULT(yes); ],
[AC_MSG_RESULT(no)]
)
AC_MSG_CHECKING([whether utmp.h has ut_tv field])
AC_EGREP_HEADER(ut_tv, utmp.h,
[AC_DEFINE(HAVE_TV_IN_UTMP) AC_MSG_RESULT(yes); ],
[AC_MSG_RESULT(no)]
)
AC_MSG_CHECKING([whether utmp.h has ut_id field])
AC_EGREP_HEADER(ut_id, utmp.h,
[AC_DEFINE(HAVE_ID_IN_UTMP) AC_MSG_RESULT(yes); ],
[AC_MSG_RESULT(no)]
)
AC_MSG_CHECKING([whether utmp.h has ut_addr field])
AC_EGREP_HEADER(ut_addr, utmp.h,
[AC_DEFINE(HAVE_ADDR_IN_UTMP) AC_MSG_RESULT(yes); ],
[AC_MSG_RESULT(no)]
)
AC_MSG_CHECKING([whether utmpx.h has ut_addr field])
AC_EGREP_HEADER(ut_addr, utmpx.h,
[AC_DEFINE(HAVE_ADDR_IN_UTMPX) AC_MSG_RESULT(yes); ],
[AC_MSG_RESULT(no)]
)
AC_MSG_CHECKING([whether utmp.h has ut_addr_v6 field])
AC_EGREP_HEADER(ut_addr_v6, utmp.h,
[AC_DEFINE(HAVE_ADDR_V6_IN_UTMP) AC_MSG_RESULT(yes); ],
[AC_MSG_RESULT(no)]
)
AC_MSG_CHECKING([whether utmpx.h has ut_addr_v6 field])
AC_EGREP_HEADER(ut_addr_v6, utmpx.h,
[AC_DEFINE(HAVE_ADDR_V6_IN_UTMPX) AC_MSG_RESULT(yes); ],
[AC_MSG_RESULT(no)]
)
AC_MSG_CHECKING([whether struct sockaddr_storage has ss_family field])
AC_TRY_COMPILE(
[
OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP)
OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmpx.h, HAVE_HOST_IN_UTMPX)
OSSH_CHECK_HEADER_FOR_FIELD(syslen, utmpx.h, HAVE_SYSLEN_IN_UTMPX)
OSSH_CHECK_HEADER_FOR_FIELD(ut_pid, utmp.h, HAVE_PID_IN_UTMP)
OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmp.h, HAVE_TYPE_IN_UTMP)
OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmp.h, HAVE_TV_IN_UTMP)
OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmp.h, HAVE_ID_IN_UTMP)
OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmp.h, HAVE_ADDR_IN_UTMP)
OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmpx.h, HAVE_ADDR_IN_UTMPX)
OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmp.h, HAVE_ADDR_V6_IN_UTMP)
OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmpx.h, HAVE_ADDR_V6_IN_UTMPX)
AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
ac_cv_have_ss_family_in_struct_ss, [
AC_TRY_COMPILE(
[
#include <sys/types.h>
#include <sys/socket.h>
],
[struct sockaddr_storage s; s.ss_family = 1;],
[
AC_DEFINE(HAVE_SS_FAMILY_IN_SS)
AC_MSG_RESULT(yes)
],
[AC_MSG_RESULT(no)]
)
AC_MSG_CHECKING([whether struct sockaddr_storage has __ss_family field])
AC_TRY_COMPILE(
[
],
[ struct sockaddr_storage s; s.ss_family = 1; ],
[ ac_cv_have_ss_family_in_struct_ss="yes" ],
[ ac_cv_have_ss_family_in_struct_ss="no" ],
)
])
if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
AC_DEFINE(HAVE_SS_FAMILY_IN_SS)
fi
AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
ac_cv_have___ss_family_in_struct_ss, [
AC_TRY_COMPILE(
[
#include <sys/types.h>
#include <sys/socket.h>
],
[struct sockaddr_storage s; s.__ss_family = 1;],
[
AC_DEFINE(HAVE___SS_FAMILY_IN_SS)
AC_MSG_RESULT(yes)
],
[AC_MSG_RESULT(no)]
)
],
[ struct sockaddr_storage s; s.__ss_family = 1; ],
[ ac_cv_have___ss_family_in_struct_ss="yes" ],
[ ac_cv_have___ss_family_in_struct_ss="no" ]
)
])
if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
AC_DEFINE(HAVE___SS_FAMILY_IN_SS)
fi
AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
AC_TRY_LINK([],
[ extern char *__progname; printf("%s", __progname); ],
[ ac_cv_libc_defines___progname="yes" ],
[ ac_cv_libc_defines___progname="no" ]
)
])
if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
AC_DEFINE(HAVE___PROGNAME)
fi
AC_MSG_CHECKING([whether libc defines __progname])
AC_TRY_LINK([],
[extern char *__progname; printf("%s", __progname);],
[
AC_DEFINE(HAVE___PROGNAME)
AC_MSG_RESULT(yes)
],
[
AC_MSG_RESULT(no)
]
)
# Looking for programs, paths and files
AC_ARG_WITH(rsh,
@@ -642,21 +637,21 @@ INSTALL_SSH_PRNG_CMDS=""
rm -f prng_commands
if test -z "$RANDOM_POOL" -a -z "$EGD_SOCKET" ; then
# Use these commands to collect entropy
AC_PATH_ENTROPY_PROG(PROG_LS, ls)
AC_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat)
AC_PATH_ENTROPY_PROG(PROG_ARP, arp)
AC_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig)
AC_PATH_ENTROPY_PROG(PROG_PS, ps)
AC_PATH_ENTROPY_PROG(PROG_W, w)
AC_PATH_ENTROPY_PROG(PROG_WHO, who)
AC_PATH_ENTROPY_PROG(PROG_LAST, last)
AC_PATH_ENTROPY_PROG(PROG_LASTLOG, lastlog)
AC_PATH_ENTROPY_PROG(PROG_DF, df)
AC_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat)
AC_PATH_ENTROPY_PROG(PROG_UPTIME, uptime)
AC_PATH_ENTROPY_PROG(PROG_IPCS, ipcs)
AC_PATH_ENTROPY_PROG(PROG_TAIL, tail)
AC_PATH_ENTROPY_PROG(PROG_LS, ls)
OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat)
OSSH_PATH_ENTROPY_PROG(PROG_ARP, arp)
OSSH_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig)
OSSH_PATH_ENTROPY_PROG(PROG_PS, ps)
OSSH_PATH_ENTROPY_PROG(PROG_W, w)
OSSH_PATH_ENTROPY_PROG(PROG_WHO, who)
OSSH_PATH_ENTROPY_PROG(PROG_LAST, last)
OSSH_PATH_ENTROPY_PROG(PROG_LASTLOG, lastlog)
OSSH_PATH_ENTROPY_PROG(PROG_DF, df)
OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat)
OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime)
OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs)
OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail)
OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
INSTALL_SSH_PRNG_CMDS="yes"
fi
@@ -844,7 +839,7 @@ AC_ARG_WITH(ipv4-default,
]
)
AC_MSG_CHECKING([to convert IPv4 in IPv6-mapped addresses])
AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses])
AC_ARG_WITH(4in6,
[ --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses],
[
+1 -1
View File
@@ -1,5 +1,5 @@
# Version of OpenSSH
%define oversion 2.0.0beta2
%define oversion 2.1.0
# Version of ssh-askpass
%define aversion 1.0
+1 -1
View File
@@ -1,6 +1,6 @@
Summary: OpenSSH, a free Secure Shell (SSH) implementation
Name: openssh
Version: 2.0.0beta2
Version: 2.1.0
URL: http://www.openssh.com/
Release: 1
Source0: openssh-%{version}.tar.gz
+13 -7
View File
@@ -28,7 +28,7 @@
*/
#include "includes.h"
RCSID("$Id: dsa.c,v 1.6 2000/05/04 22:37:59 markus Exp $");
RCSID("$Id: dsa.c,v 1.7 2000/05/08 17:42:24 markus Exp $");
#include "ssh.h"
#include "xmalloc.h"
@@ -162,7 +162,7 @@ dsa_sign(
BN_bn2bin(sig->s, sigblob+ SIGBLOB_LEN - slen);
DSA_SIG_free(sig);
if (datafellows) {
if (datafellows & SSH_BUG_SIGBLOB) {
debug("datafellows");
ret = xmalloc(SIGBLOB_LEN);
memcpy(ret, sigblob, SIGBLOB_LEN);
@@ -209,15 +209,20 @@ dsa_verify(
return -1;
}
if (datafellows && signaturelen != SIGBLOB_LEN) {
log("heh? datafellows ssh2 complies with ietf-drafts????");
datafellows = 0;
if (!(datafellows & SSH_BUG_SIGBLOB) &&
signaturelen == SIGBLOB_LEN) {
datafellows |= ~SSH_BUG_SIGBLOB;
log("autodetect SSH_BUG_SIGBLOB");
} else if ((datafellows & SSH_BUG_SIGBLOB) &&
signaturelen != SIGBLOB_LEN) {
log("autoremove SSH_BUG_SIGBLOB");
datafellows &= ~SSH_BUG_SIGBLOB;
}
debug("len %d datafellows %d", signaturelen, datafellows);
/* fetch signature */
if (datafellows) {
if (datafellows & SSH_BUG_SIGBLOB) {
sigblob = signature;
len = signaturelen;
} else {
@@ -242,7 +247,8 @@ dsa_verify(
sig->s = BN_new();
BN_bin2bn(sigblob, INTBLOB_LEN, sig->r);
BN_bin2bn(sigblob+ INTBLOB_LEN, INTBLOB_LEN, sig->s);
if (!datafellows) {
if (!(datafellows & SSH_BUG_SIGBLOB)) {
memset(sigblob, 0, len);
xfree(sigblob);
}
+2 -16
View File
@@ -89,22 +89,8 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
#include "version.h"
/* BSD function replacements */
#include "bsd-bindresvport.h"
#include "bsd-rresvport.h"
#include "bsd-misc.h"
#include "bsd-strlcpy.h"
#include "bsd-strlcat.h"
#include "bsd-mktemp.h"
#include "bsd-snprintf.h"
#include "bsd-daemon.h"
#include "bsd-login.h"
#include "bsd-base64.h"
/* rfc2553 socket API replacements */
#include "fake-getaddrinfo.h"
#include "fake-getnameinfo.h"
#include "fake-socket.h"
/* OpenBSD function replacements */
#include "openbsd-compat.h"
/* Entropy collection */
#include "entropy.h"
+2 -2
View File
@@ -28,7 +28,7 @@
*/
#include "includes.h"
RCSID("$Id: kex.c,v 1.7 2000/04/16 01:52:47 damien Exp $");
RCSID("$Id: kex.c,v 1.8 2000/05/09 01:03:01 damien Exp $");
#include "ssh.h"
#include "ssh2.h"
@@ -314,7 +314,7 @@ choose_mac(Mac *mac, char *client, char *server)
}
mac->name = name;
mac->mac_len = mac->md->md_size;
mac->key_len = datafellows ? 16 : mac->mac_len;
mac->key_len = (datafellows & SSH_BUG_HMAC) ? 16 : mac->mac_len;
mac->key = NULL;
mac->enabled = 0;
}
+1 -1
View File
@@ -1,6 +1,6 @@
#define KEX_DEFAULT_KEX "diffie-hellman-group1-sha1"
#define KEX_DEFAULT_PK_ALG "ssh-dss"
#define KEX_DEFAULT_ENCRYPT "blowfish-cbc,3des-cbc,arcfour,cast128-cbc"
#define KEX_DEFAULT_ENCRYPT "3des-cbc,blowfish-cbc,arcfour,cast128-cbc"
#define KEX_DEFAULT_MAC "hmac-sha1,hmac-md5,[email protected]"
#define KEX_DEFAULT_COMP "zlib,none"
#define KEX_DEFAULT_LANG ""
+5 -1
View File
@@ -28,7 +28,7 @@
*/
#include "includes.h"
RCSID("$Id: nchan.c,v 1.9 2000/05/07 02:03:16 damien Exp $");
RCSID("$Id: nchan.c,v 1.10 2000/05/09 01:03:01 damien Exp $");
#include "ssh.h"
@@ -107,6 +107,10 @@ chan_read_failed_12(Channel *c)
debug("channel %d: input open -> drain", c->self);
chan_shutdown_read(c);
c->istate = CHAN_INPUT_WAIT_DRAIN;
if (buffer_len(&c->input) == 0) {
debug("channel %d: input: no drain shortcut", c->self);
chan_ibuf_empty(c);
}
break;
default:
error("channel %d: internal error: we do not read, but chan_read_failed for istate %d",
+23
View File
@@ -0,0 +1,23 @@
#ifndef _OPENBSD_H
#define _OPENBSD_H
#include "config.h"
/* BSD function replacements */
#include "bsd-bindresvport.h"
#include "bsd-rresvport.h"
#include "bsd-misc.h"
#include "bsd-strlcpy.h"
#include "bsd-strlcat.h"
#include "bsd-mktemp.h"
#include "bsd-snprintf.h"
#include "bsd-daemon.h"
#include "bsd-login.h"
#include "bsd-base64.h"
/* rfc2553 socket API replacements */
#include "fake-getaddrinfo.h"
#include "fake-getnameinfo.h"
#include "fake-socket.h"
#endif /* _OPENBSD_H */
+3 -2
View File
@@ -14,7 +14,7 @@
*/
#include "includes.h"
RCSID("$Id: readconf.c,v 1.13 2000/05/07 02:03:17 damien Exp $");
RCSID("$Id: readconf.c,v 1.14 2000/05/09 01:03:01 damien Exp $");
#include "ssh.h"
#include "cipher.h"
@@ -475,7 +475,7 @@ parse_int:
case oCiphers:
cp = strtok(NULL, WHITESPACE);
if (!ciphers_valid(cp))
fatal("%.200s line %d: Bad cipher spec '%s'.",
fatal("%.200s line %d: Bad SSH2 cipher spec '%s'.",
filename, linenum, cp ? cp : "<NONE>");
if (*activep && options->ciphers == NULL)
options->ciphers = xstrdup(cp);
@@ -745,6 +745,7 @@ fill_default_options(Options * options)
/* Selected in ssh_login(). */
if (options->cipher == -1)
options->cipher = SSH_CIPHER_NOT_SET;
/* options->ciphers, default set in myproposals.h */
if (options->protocol == SSH_PROTO_UNKNOWN)
options->protocol = SSH_PROTO_1|SSH_PROTO_2|SSH_PROTO_1_PREFERRED;
if (options->num_identity_files == 0) {
+2 -2
View File
@@ -13,7 +13,7 @@
*
*/
/* RCSID("$Id: readconf.h,v 1.10 2000/05/07 02:03:17 damien Exp $"); */
/* RCSID("$Id: readconf.h,v 1.11 2000/05/09 01:03:01 damien Exp $"); */
#ifndef READCONF_H
#define READCONF_H
@@ -65,7 +65,7 @@ typedef struct {
int number_of_password_prompts; /* Max number of password
* prompts. */
int cipher; /* Cipher to use. */
char *ciphers; /* Ciphers in order of preference. */
char *ciphers; /* SSH2 ciphers in order of preference. */
int protocol; /* Protocol in order of preference. */
char *hostname; /* Real host to connect. */
char *proxy_command; /* Proxy command for connecting the host. */
+2 -2
View File
@@ -12,7 +12,7 @@
*/
#include "includes.h"
RCSID("$Id: servconf.c,v 1.15 2000/05/07 02:03:18 damien Exp $");
RCSID("$Id: servconf.c,v 1.16 2000/05/09 01:03:01 damien Exp $");
#include "ssh.h"
#include "servconf.h"
@@ -589,7 +589,7 @@ parse_flag:
case sCiphers:
cp = strtok(NULL, WHITESPACE);
if (!ciphers_valid(cp))
fatal("%s line %d: Bad cipher spec '%s'.",
fatal("%s line %d: Bad SSH2 cipher spec '%s'.",
filename, linenum, cp ? cp : "<NONE>");
if (options->ciphers == NULL)
options->ciphers = xstrdup(cp);
+4 -4
View File
@@ -9,7 +9,7 @@
.\"
.\" Created: Sat Apr 22 23:55:14 1995 ylo
.\"
.\" $Id: ssh-keygen.1,v 1.14 2000/05/07 02:03:18 damien Exp $
.\" $Id: ssh-keygen.1,v 1.15 2000/05/09 01:03:02 damien Exp $
.\"
.Dd September 25, 1999
.Dt SSH-KEYGEN 1
@@ -142,13 +142,13 @@ support is not functional, exits with code 1. This flag will be
removed once the RSA patent expires.
.It Fl x
This option will read a private
OpenSSH DSA format file and prints to stdout a SSH2-compatible public key.
OpenSSH DSA format file and print a SSH2-compatible public key to stdout.
.It Fl X
This option will read a
SSH2-compatible public key file and print to stdout an OpenSSH DSA compatible public key.
SSH2-compatible public key file and print an OpenSSH DSA compatible public key to stdout.
.It Fl y
This option will read a private
OpenSSH DSA format file and prints to stdout an OpenSSH DSA public key.
OpenSSH DSA format file and print an OpenSSH DSA public key to stdout.
.El
.Sh FILES
.Bl -tag -width Ds
+12 -4
View File
@@ -7,7 +7,7 @@
*/
#include "includes.h"
RCSID("$Id: ssh-keygen.c,v 1.17 2000/05/07 02:03:19 damien Exp $");
RCSID("$Id: ssh-keygen.c,v 1.18 2000/05/09 01:03:02 damien Exp $");
#include <openssl/evp.h>
#include <openssl/pem.h>
@@ -148,6 +148,7 @@ do_convert_from_ssh2(struct passwd *pw)
char blob[8096];
char encoded[8096];
struct stat st;
int escaped = 0;
FILE *fp;
if (!have_identity)
@@ -163,14 +164,21 @@ do_convert_from_ssh2(struct passwd *pw)
}
encoded[0] = '\0';
while (fgets(line, sizeof(line), fp)) {
if (!(p = strchr(line, '\n'))) {
fprintf(stderr, "input line too long.\n");
exit(1);
}
if (p > line && p[-1] == '\\')
escaped++;
if (strncmp(line, "----", 4) == 0 ||
strstr(line, ": ") != NULL) {
fprintf(stderr, "ignore: %s", line);
continue;
}
if (!(p = strchr(line, '\n'))) {
fprintf(stderr, "input line too long.\n");
exit(1);
if (escaped) {
escaped--;
fprintf(stderr, "escaped: %s", line);
continue;
}
*p = '\0';
strlcat(encoded, line, sizeof(encoded));
+11 -6
View File
@@ -9,7 +9,7 @@
.\"
.\" Created: Sat Apr 22 21:55:14 1995 ylo
.\"
.\" $Id: ssh.1,v 1.24 2000/05/07 02:03:19 damien Exp $
.\" $Id: ssh.1,v 1.25 2000/05/09 01:03:02 damien Exp $
.\"
.Dd September 25, 1999
.Dt SSH 1
@@ -25,7 +25,7 @@
.Pp
.Nm ssh
.Op Fl afgknqtvxCPX246
.Op Fl c Ar blowfish | 3des
.Op Fl c Ar cipher_spec
.Op Fl e Ar escape_char
.Op Fl i Ar identity_file
.Op Fl l Ar login_name
@@ -202,7 +202,7 @@ This protocol 2 implementation does not yet support Kerberos or
S/Key authentication.
.Pp
Protocol 2 provides additional mechanisms for confidentiality
(the traffic is encrypted using 3DES, blowfish, cast128 or arcfour)
(the traffic is encrypted using 3DES, Blowfish, CAST128 or Arcfour)
and integrity (hmac-sha1, hmac-md5).
Note that protocol 1 lacks a strong mechanism for ensuring the
integrity of the connection.
@@ -342,10 +342,15 @@ It is believed to be secure.
(triple-des) is an encrypt-decrypt-encrypt triple with three different keys.
It is presumably more secure than the
.Ar des
cipher which is no longer supported in ssh.
cipher which is no longer supported in
.Nm ssh .
.Ar blowfish
is a fast block cipher, it appears very secure and is much faster than
.Ar 3des .
.It Fl c Ar "3des-cbc,blowfish-cbc,arcfour,cast128-cbc"
Additionally, for protocol version 2 a comma-separated list of ciphers can
be specified in order of preference. Protocol version 2 supports
3DES, Blowfish and CAST128 in CBC mode and Arcfour.
.It Fl e Ar ch|^ch|none
Sets the escape character for sessions with a pty (default:
.Ql ~ ) .
@@ -601,7 +606,7 @@ Specifies the ciphers allowed for protocol version 2
in order of preference.
Multiple ciphers must be comma-separated.
The default is
.Dq blowfish-cbc,3des-cbc,arcfour,cast128-cbc .
.Dq 3des-cbc,blowfish-cbc,arcfour,cast128-cbc .
.It Cm Compression
Specifies whether to use compression.
The argument must be
@@ -785,7 +790,7 @@ The default is
This means that
.Nm
tries version 1 and falls back to version 2
if version 1 is no available.
if version 1 is not available.
.It Cm ProxyCommand
Specifies the command to use to connect to the server.
The command
+2 -1
View File
@@ -11,7 +11,7 @@
*/
#include "includes.h"
RCSID("$Id: ssh.c,v 1.29 2000/05/01 10:59:51 damien Exp $");
RCSID("$Id: ssh.c,v 1.30 2000/05/09 01:03:02 damien Exp $");
#include <openssl/evp.h>
#include <openssl/dsa.h>
@@ -367,6 +367,7 @@ main(int ac, char **av)
if (ciphers_valid(optarg)) {
/* SSH2 only */
options.ciphers = xstrdup(optarg);
options.cipher = SSH_CIPHER_ILLEGAL;
} else {
/* SSH1 only */
options.cipher = cipher_number(optarg);
+2 -1
View File
@@ -13,7 +13,7 @@
*
*/
/* RCSID("$Id: ssh.h,v 1.38 2000/05/07 02:03:19 damien Exp $"); */
/* RCSID("$Id: ssh.h,v 1.39 2000/05/09 01:03:02 damien Exp $"); */
#ifndef SSH_H
#define SSH_H
@@ -30,6 +30,7 @@
#include "cipher.h"
/*
* XXX
* The default cipher used if IDEA is not supported by the remote host. It is
* recommended that this be one of the mandatory ciphers (DES, 3DES), though
* that is not required.
+8 -4
View File
@@ -9,7 +9,7 @@
*/
#include "includes.h"
RCSID("$OpenBSD: sshconnect1.c,v 1.2 2000/05/04 22:38:00 markus Exp $");
RCSID("$OpenBSD: sshconnect1.c,v 1.3 2000/05/08 17:12:16 markus Exp $");
#include <openssl/bn.h>
#include <openssl/dsa.h>
@@ -832,13 +832,17 @@ ssh_kex(char *host, struct sockaddr *hostaddr)
RSA_free(public_key);
RSA_free(host_key);
if (options.cipher == SSH_CIPHER_NOT_SET) {
if (options.cipher == SSH_CIPHER_ILLEGAL) {
log("No valid SSH1 cipher, using %.100s instead.",
cipher_name(SSH_FALLBACK_CIPHER));
options.cipher = SSH_FALLBACK_CIPHER;
} else if (options.cipher == SSH_CIPHER_NOT_SET) {
if (cipher_mask1() & supported_ciphers & (1 << ssh_cipher_default))
options.cipher = ssh_cipher_default;
else {
debug("Cipher %s not supported, using %.100s instead.",
cipher_name(ssh_cipher_default),
cipher_name(SSH_FALLBACK_CIPHER));
cipher_name(ssh_cipher_default),
cipher_name(SSH_FALLBACK_CIPHER));
options.cipher = SSH_FALLBACK_CIPHER;
}
}
+25 -9
View File
@@ -28,7 +28,7 @@
*/
#include "includes.h"
RCSID("$OpenBSD: sshconnect2.c,v 1.8 2000/05/07 18:23:32 markus Exp $");
RCSID("$OpenBSD: sshconnect2.c,v 1.10 2000/05/08 17:42:25 markus Exp $");
#include <openssl/bn.h>
#include <openssl/rsa.h>
@@ -96,13 +96,14 @@ ssh_kex2(char *host, struct sockaddr *hostaddr)
if (options.ciphers != NULL) {
myproposal[PROPOSAL_ENC_ALGS_CTOS] =
myproposal[PROPOSAL_ENC_ALGS_STOC] = options.ciphers;
} else if (
options.cipher == SSH_CIPHER_ARCFOUR ||
options.cipher == SSH_CIPHER_3DES_CBC ||
options.cipher == SSH_CIPHER_CAST128_CBC ||
options.cipher == SSH_CIPHER_BLOWFISH_CBC) {
} else if (options.cipher == SSH_CIPHER_3DES) {
myproposal[PROPOSAL_ENC_ALGS_CTOS] =
myproposal[PROPOSAL_ENC_ALGS_STOC] = cipher_name(options.cipher);
myproposal[PROPOSAL_ENC_ALGS_STOC] =
cipher_name(SSH_CIPHER_3DES_CBC);
} else if (options.cipher == SSH_CIPHER_BLOWFISH) {
myproposal[PROPOSAL_ENC_ALGS_CTOS] =
myproposal[PROPOSAL_ENC_ALGS_STOC] =
cipher_name(SSH_CIPHER_BLOWFISH_CBC);
}
if (options.compression) {
myproposal[PROPOSAL_COMP_ALGS_CTOS] = "zlib";
@@ -344,12 +345,14 @@ ssh2_try_pubkey(char *filename,
buffer_append(&b, session_id2, session_id2_len);
buffer_put_char(&b, SSH2_MSG_USERAUTH_REQUEST);
buffer_put_cstring(&b, server_user);
buffer_put_cstring(&b, service);
buffer_put_cstring(&b,
datafellows & SSH_BUG_PUBKEYAUTH ?
"ssh-userauth" :
service);
buffer_put_cstring(&b, "publickey");
buffer_put_char(&b, 1);
buffer_put_cstring(&b, KEX_DSS);
buffer_put_string(&b, blob, bloblen);
xfree(blob);
/* generate signature */
dsa_sign(k, &signature, &slen, buffer_ptr(&b), buffer_len(&b));
@@ -357,6 +360,19 @@ ssh2_try_pubkey(char *filename,
#ifdef DEBUG_DSS
buffer_dump(&b);
#endif
if (datafellows & SSH_BUG_PUBKEYAUTH) {
/* e.g. ssh-2.0.13: data-to-be-signed != data-on-the-wire */
buffer_clear(&b);
buffer_append(&b, session_id2, session_id2_len);
buffer_put_char(&b, SSH2_MSG_USERAUTH_REQUEST);
buffer_put_cstring(&b, server_user);
buffer_put_cstring(&b, service);
buffer_put_cstring(&b, "publickey");
buffer_put_char(&b, 1);
buffer_put_cstring(&b, KEX_DSS);
buffer_put_string(&b, blob, bloblen);
}
xfree(blob);
/* append signature */
buffer_put_string(&b, signature, slen);
xfree(signature);
+9 -9
View File
@@ -9,7 +9,7 @@
.\"
.\" Created: Sat Apr 22 21:55:14 1995 ylo
.\"
.\" $Id: sshd.8,v 1.21 2000/05/07 02:03:20 damien Exp $
.\" $Id: sshd.8,v 1.22 2000/05/09 01:03:03 damien Exp $
.\"
.Dd September 25, 1999
.Dt SSHD 8
@@ -115,7 +115,7 @@ Blowfish, 3DES or CAST128 in CBC mode or Arcfour.
The client selects the encryption algorithm
to use from those offered by the server.
Additionally, session integrity is provided
through a crytographic message authentication code
through a cryptographic message authentication code
(hmac-sha1 or hmac-md5).
.Pp
Protocol version 2 provides a public key based
@@ -277,7 +277,7 @@ By default login is allowed regardless of the user name.
Specifies the ciphers allowed for protocol version 2.
Multiple ciphers must be comma-separated.
The default is
.Dq blowfish-cbc,3des-cbc,arcfour,cast128-cbc .
.Dq 3des-cbc,blowfish-cbc,arcfour,cast128-cbc .
.It Cm CheckMail
Specifies whether
.Nm
@@ -327,14 +327,14 @@ Specifies the file containing the private DSA host key (default
used by SSH protocol 2.0.
Note that
.Nm
disables protcol 2.0 if this file is group/world-accessible.
disables protocol 2.0 if this file is group/world-accessible.
.It Cm HostKey
Specifies the file containing the private RSA host key (default
.Pa /etc/ssh_host_key )
used by SSH protocols 1.3 and 1.5.
Note that
.Nm
disables protcols 1.3 and 1.5 if this file is group/world-accessible.
disables protocols 1.3 and 1.5 if this file is group/world-accessible.
.It Cm IgnoreRhosts
Specifies that
.Pa .rhosts
@@ -364,7 +364,7 @@ of the machines will be properly noticed.
However, this means that
connections will die if the route is down temporarily, and some people
find it annoying.
On the other hand, if keepalives are not send,
On the other hand, if keepalives are not sent,
sessions may hang indefinitely on the server, leaving
.Dq ghost
users and consuming server resources.
@@ -620,7 +620,7 @@ The
.Pa $HOME/.ssh/authorized_keys
file lists the RSA keys that are
permitted for RSA authentication in SSH protocols 1.3 and 1.5
Similarily, the
Similarly, the
.Pa $HOME/.ssh/authorized_keys2
file lists the DSA keys that are
permitted for DSA authentication in SSH protocol 2.0.
@@ -679,8 +679,8 @@ A quote may be included in the command by quoting it with a backslash.
This option might be useful
to restrict certain RSA keys to perform just a specific operation.
An example might be a key that permits remote backups but nothing else.
Notice that the client may specify TCP/IP and/or X11
forwardings unless they are explicitly prohibited.
Note that the client may specify TCP/IP and/or X11
forwarding unless they are explicitly prohibited.
.It Cm environment="NAME=value"
Specifies that the string is to be added to the environment when
logging in using this key.
-2
View File
@@ -4,8 +4,6 @@
#include "includes.h"
#include "xmalloc.h"
#include <resolv.h>
int
uuencode(unsigned char *src, unsigned int srclength,
char *target, size_t targsize)
+1 -1
View File
@@ -1 +1 @@
#define SSH_VERSION "OpenSSH-2.0"
#define SSH_VERSION "OpenSSH-2.1"