Compare commits

...

10 Commits

Author SHA1 Message Date
Matt Johnston
f3c8bb2bce merge of 00b67a11e33c3ed390556805ed6d1078528bee70
and 42c7bdf484b16e279a0f68604a4346d8fa5ed70c

--HG--
extra : convert_revision : edf8bd9174de26de093d842aa4bd9cb43c2e257b
2004-09-04 14:19:17 +00:00
Matt Johnston
ee23b01f0b Some small fixes for unused vars, and old messages
--HG--
extra : convert_revision : 83d9a25ee973ab65fa64dcf8595838b160c21663
2004-08-17 11:14:13 +00:00
Matt Johnston
3cacc54b78 Small fixes
--HG--
extra : convert_revision : 7f568ec9a453957b16efab56c215a4914f0cebf3
2004-08-17 10:40:31 +00:00
Matt Johnston
4657ed1446 #ifdef for PENDIN
--HG--
extra : convert_revision : a9c59907d9b02918f78f5d0f9e7bc67be0b7ca6f
2004-08-17 10:29:04 +00:00
Matt Johnston
4a52217ed4 default initialisers for mp_ints
--HG--
extra : convert_revision : af69bacb50a31523e383e8f73844d04681f9e394
2004-08-17 10:20:20 +00:00
Matt Johnston
954a8dce0f fix for AIX not having WCOREDUMP
--HG--
extra : convert_revision : 9a728aa6db6d1105267c377fa3d5448ee5f5a4ca
2004-08-17 09:56:23 +00:00
Matt Johnston
6ec8183750 do the symlinks for multi-binary compiles
--HG--
extra : convert_revision : 1a0ab43c58435f03b261ef322d24fbb5c91e8abd
2004-08-17 04:35:01 +00:00
Matt Johnston
eb1f647c9c dbclient works as "ssh" too
--HG--
extra : convert_revision : 4bf3c662e114ad16c54afdf923f2852e511f77eb
2004-08-16 14:53:49 +00:00
Matt Johnston
029ae35058 create known_hosts properly
--HG--
extra : convert_revision : 3f808121bb4c3b4e0ce32db12525c63d692f1dbd
2004-08-16 14:46:13 +00:00
Matt Johnston
fdfc95df8b - don't crash when trying to add to known_hosts if it doesn't exist
- comments

--HG--
extra : convert_revision : ffafd48c7494fee17a98d901e30c3372e1a092e9
2004-08-16 08:59:11 +00:00
19 changed files with 156 additions and 85 deletions

20
CHANGES
View File

@@ -1,4 +1,22 @@
0.44test1 - Sun Aug 16 2004 17:43:54 +0800
0.44test2 - Tues Aug 17 2004 17:43:54 +0800
- Fix up dropbearmulti targets in the Makefile - symlinks are now created
- Compile fake-rfc2553 even with dropbearconvert/dropbearkey - this
allows them to work on platforms without a native getaddrinfo()
- Create ~/.ssh/known_hosts properly if it doesn't exist
- Fix basename() function prototype
- Backport some local changes (more #ifdefs for termcodes.c, a fix for missing
defines on AIX).
- Let dbclient be run as "ssh"
- Initialise mp_ints by default
0.44test1 - Sun Aug 16 2005 17:43:54 +0800
- TESTING RELEASE - this is the first public release of the client codebase,
so there are sure to be bugs to be found. In addition, if you're just using

View File

@@ -3,11 +3,10 @@
# invocation:
# make PROGRAMS="dropbear dbclient scp" MULTI=1 STATIC=1 SCPPROGRESS=1
#
# to make a single multiple statically linked binary "staticdropbearmulti",
# which includes dropbear, scp and dbclient functionality, and includes the
# progress-bar functionality in scp. Hopefully that seems intuitive.
# This makefile is quite evil.
# to make a multiple-program statically linked binary "staticdropbearmulti".
# This example will include dropbear, scp, dropbearkey, dropbearconvert, and
# dbclient functionality, and includes the progress-bar functionality in scp.
# Hopefully that seems intuitive.
ifndef PROGRAMS
PROGRAMS=dropbear dbclient dropbearkey dropbearconvert
@@ -20,7 +19,7 @@ COMMONOBJS=dbutil.o buffer.o \
dss.o bignum.o \
signkey.o rsa.o random.o \
queue.o \
atomicio.o compat.o
atomicio.o compat.o fake-rfc2553.o
SVROBJS=svr-kex.o svr-algo.o svr-auth.o sshpty.o \
svr-authpasswd.o svr-authpubkey.o svr-session.o svr-service.o \
@@ -34,7 +33,7 @@ CLIOBJS=cli-algo.o cli-main.o cli-auth.o cli-authpasswd.o cli-kex.o \
CLISVROBJS=common-session.o packet.o common-algo.o common-kex.o \
common-channel.o common-chansession.o termcodes.o loginrec.o \
tcp-accept.o listener.o process-packet.o \
common-runopts.o fake-rfc2553.o
common-runopts.o
KEYOBJS=dropbearkey.o gendss.o genrsa.o
@@ -115,25 +114,36 @@ all: $(TARGETS)
strip: $(TARGETS)
$(STRIP) $(addsuffix $(EXEEXT), $(addprefix $(SPREFIX), $(TARGETS)))
install: $(addprefix install, $(TARGETS))
install: $(addprefix inst, $(TARGETS))
installdropbearmulti: insdbmulti $(addprefix insmulti, $(PROGRAMS))
insdbmulti: dropbearmulti
$(INSTALL) -d -m 755 $(DESTDIR)$(bindir)
$(INSTALL) -m 755 $(SPREFIX)dropbearmulti$(EXEEXT) $(DESTDIR)$(bindir)
-chown root $(DESTDIR)$(bindir)/$(SPREFIX)dropbearmulti$(EXEEXT)
-chgrp 0 $(DESTDIR)$(bindir)/$(SPREFIX)dropbearmulti$(EXEEXT)
insmultidropbear: dropbearmulti
-rm -f $(DESTDIR)$(sbindir)/$(SPREFIX)dropbear$(EXEEXT)
-ln -s $(DESTDIR)$(bindir)/$(SPREFIX)dropbearmulti$(EXEEXT) $(DESTDIR)$(sbindir)/$(SPREFIX)dropbear$(EXEEXT)
insmulti%: dropbearmulti
-rm -f $(DESTDIR)$(bindir)/$(SPREFIX)$*$(EXEEXT)
-ln -s $(DESTDIR)$(bindir)/$(SPREFIX)dropbearmulti$(EXEEXT) $(DESTDIR)$(bindir)/$(SPREFIX)$*$(EXEEXT)
# dropbear should go in sbin, so it needs a seperate rule
installdropbear: dropbear
instdropbear: dropbear
$(INSTALL) -d -m 755 $(DESTDIR)$(sbindir)
$(INSTALL) -m 755 $(SPREFIX)dropbear$(EXEEXT) $(DESTDIR)$(sbindir)
-chown root $(DESTDIR)$(sbindir)/$(SPREFIX)dropbear$(EXEEXT)
-chgrp 0 $(DESTDIR)$(sbindir)/$(SPREFIX)dropbear$(EXEEXT)
install%: $*
inst%: $*
$(INSTALL) -d -m 755 $(DESTDIR)$(bindir)
$(INSTALL) -m 755 $(SPREFIX)$*$(EXEEXT) $(DESTDIR)$(bindir)
-chown root $(DESTDIR)$(sbindir)/$(SPREFIX)$*$(EXEEXT)
-chgrp 0 $(DESTDIR)$(sbindir)/$(SPREFIX)$*$(EXEEXT)
ifeq ($(MULTI), 1)
@echo
@echo "You must manually create links for $*"
endif
-chown root $(DESTDIR)$(bindir)/$(SPREFIX)$*$(EXEEXT)
-chgrp 0 $(DESTDIR)$(bindir)/$(SPREFIX)$*$(EXEEXT)
# for some reason the rule further down doesn't like $($@objs) as a prereq.
@@ -158,11 +168,16 @@ ifeq ($(MULTI),1)
CFLAGS+=$(addprefix -DDBMULTI_, $(PROGRAMS)) -DDROPBEAR_MULTI
endif
dropbearmulti: $(HEADERS) $(MULTIOBJS) $(LTC) $(LTM) Makefile
$(LD) $(LDFLAGS) -o $(SPREFIX)$@$(EXEEXT) $(MULTIOBJS) $(LIBS)
@echo
@echo "You should now create symlinks to the programs you have included"
@echo "ie 'ln -s dropbearmulti dropbear'"
dropbearmulti: multilink
multibinary: $(HEADERS) $(MULTIOBJS) $(LTC) $(LTM) Makefile
$(LD) $(LDFLAGS) -o $(SPREFIX)dropbearmulti$(EXEEXT) $(MULTIOBJS) $(LIBS)
multilink: multibinary $(addprefix link, $(PROGRAMS))
link%:
-rm -f $(SPREFIX)$*$(EXEEXT)
-ln -s $(SPREFIX)dropbearmulti$(EXEEXT) $(SPREFIX)$*$(EXEEXT)
$(LTC): options.h
cd libtomcrypt && $(MAKE) clean && $(MAKE)
@@ -179,7 +194,9 @@ ltm-clean:
sizes: dropbear
objdump -t dropbear|grep ".text"|cut -d "." -f 2|sort -rn
clean: ltc-clean ltm-clean
clean: ltc-clean ltm-clean thisclean
thisclean:
-rm -f dropbear dbclient dropbearkey dropbearconvert scp scp-progress
-rm -f staticdropbear staticdropbearkey staticdropbearconvert staticscp
-rm -f dropbearmulti staticdropbearmulti

17
README
View File

@@ -17,7 +17,7 @@ matt@ucc.asn.au
In the absence of detailed documentation, some notes follow:
============================================================================
Public key auth:
Server public key auth:
You can use ~/.ssh/authorized_keys in the same way as with OpenSSH, just put
the key entries in that file. They should be of the form:
@@ -32,6 +32,21 @@ OpenSSH sshd manpage, and will not allow a login for these keys.
============================================================================
Client public key auth:
Dropbear can do public key auth as a client, but you will have to convert
OpenSSH style keys to Dropbear format, or use dropbearkey to create them.
If you have an OpenSSH-style private key ~/.ssh/id_rsa, you need to do:
dropbearconvert openssh dropbear ~/.ssh/id_rsa ~/.ssh/id_rsa.db
dbclient -i ~/.ssh/id_rsa.db <hostname>
Currently encrypted keys aren't supported, neither is agent forwarding. At some
stage both hopefully will be.
============================================================================
If you want to get the public-key portion of a Dropbear private key, look at
dropbearkey's '-y' option.

2
TODO
View File

@@ -8,6 +8,8 @@ Things which might need doing:
- fix agent fwd problems
- handle /etc/environment in AIX
- improve channel window adjustment algorithm (circular buffering)
- check that there aren't timing issues with valid/invalid user authentication

View File

@@ -45,8 +45,8 @@ void send_msg_kexdh_init() {
cli_ses.dh_e = (mp_int*)m_malloc(sizeof(mp_int));
cli_ses.dh_x = (mp_int*)m_malloc(sizeof(mp_int));
m_mp_init_multi(cli_ses.dh_e, cli_ses.dh_x, NULL);
gen_kexdh_vals(cli_ses.dh_e, cli_ses.dh_x);
CHECKCLEARTOWRITE();
@@ -59,13 +59,18 @@ void send_msg_kexdh_init() {
/* Handle a diffie-hellman key exchange reply. */
void recv_msg_kexdh_reply() {
mp_int dh_f;
DEF_MP_INT(dh_f);
sign_key *hostkey = NULL;
unsigned int type, keybloblen;
unsigned char* keyblob = NULL;
TRACE(("enter recv_msg_kexdh_reply"));
if (cli_ses.kex_state != KEXDH_INIT_SENT) {
dropbear_exit("Received out-of-order kexdhreply");
}
m_mp_init(&dh_f);
type = ses.newkeys->algo_hostkey;
TRACE(("type is %d", type));
@@ -83,7 +88,6 @@ void recv_msg_kexdh_reply() {
dropbear_exit("Bad KEX packet");
}
m_mp_init(&dh_f);
if (buf_getmpint(ses.payload, &dh_f) != DROPBEAR_SUCCESS) {
TRACE(("failed getting mpint"));
dropbear_exit("Bad KEX packet");
@@ -91,6 +95,9 @@ void recv_msg_kexdh_reply() {
kexdh_comb_key(cli_ses.dh_e, cli_ses.dh_x, &dh_f, hostkey);
mp_clear(&dh_f);
mp_clear_multi(cli_ses.dh_e, cli_ses.dh_x, NULL);
m_free(cli_ses.dh_e);
m_free(cli_ses.dh_x);
if (buf_verify(ses.payload, hostkey, ses.hash, SHA1_HASH_SIZE)
!= DROPBEAR_SUCCESS) {
@@ -147,21 +154,27 @@ static void checkhostkey(unsigned char* keyblob, unsigned int keybloblen) {
/* Check that ~/.ssh exists - easiest way is just to mkdir */
if (mkdir(filename, S_IRWXU) != 0) {
if (errno != EEXIST) {
dropbear_log(LOG_INFO, "Warning: failed creating ~/.ssh: %s",
strerror(errno));
TRACE(("mkdir didn't work: %s", strerror(errno)));
ask_to_confirm(keyblob, keybloblen);
goto out; /* only get here on success */
}
}
snprintf(filename, len+18, "%s/.ssh/known_hosts", pw->pw_dir);
hostsfile = fopen(filename, "r+");
hostsfile = fopen(filename, "a+");
fseek(hostsfile, 0, SEEK_SET);
/* We mightn't have been able to open it if it was read-only */
if (hostsfile == NULL && (errno == EACCES || errno == EROFS)) {
TRACE(("trying readonly: %s", strerror(errno)));
readonly = 1;
hostsfile = fopen(filename, "r");
}
if (hostsfile == NULL) {
TRACE(("hostsfile didn't open: %s", strerror(errno)));
ask_to_confirm(keyblob, keybloblen);
goto out; /* We only get here on success */
}
@@ -228,11 +241,12 @@ static void checkhostkey(unsigned char* keyblob, unsigned int keybloblen) {
/* If we get here, they said yes */
if (readonly) {
TRACE(("readonly"));
goto out;
}
/* put the new entry in the file */
fseek(hostsfile, 0, SEEK_END);
fseek(hostsfile, 0, SEEK_END); /* In case it wasn't opened append */
buf_setpos(line, 0);
buf_setlen(line, 0);
buf_putbytes(line, ses.remotehost, hostlen);
@@ -255,5 +269,7 @@ out:
fclose(hostsfile);
}
m_free(filename);
buf_free(line);
if (line != NULL) {
buf_free(line);
}
}

View File

@@ -464,15 +464,18 @@ void recv_msg_kexinit() {
/* Initialises and generate one side of the diffie-hellman key exchange values.
* See the ietf-secsh-transport draft, section 6, for details */
/* dh_pub and dh_priv MUST be already initialised */
void gen_kexdh_vals(mp_int *dh_pub, mp_int *dh_priv) {
mp_int dh_p, dh_q, dh_g;
DEF_MP_INT(dh_p);
DEF_MP_INT(dh_q);
DEF_MP_INT(dh_g);
unsigned char randbuf[DH_P_LEN];
int dh_q_len;
TRACE(("enter send_msg_kexdh_reply"));
m_mp_init_multi(&dh_g, &dh_p, &dh_q, dh_priv, dh_pub, NULL);
m_mp_init_multi(&dh_g, &dh_p, &dh_q, NULL);
/* read the prime and generator*/
if (mp_read_unsigned_bin(&dh_p, (unsigned char*)dh_p_val, DH_P_LEN)

View File

@@ -190,7 +190,7 @@ int daemon(int nochdir, int noclose) {
#ifndef HAVE_BASENAME
char *basename(char *path) {
char *basename(const char *path) {
char *foo = strrchr(path, '/');
return ++foo;

View File

@@ -44,7 +44,8 @@ int main(int argc, char ** argv) {
}
#endif
#ifdef DBMULTI_dbclient
if (strcmp(progname, "dbclient") == 0) {
if (strcmp(progname, "dbclient") == 0
|| strcmp(progname, "ssh") == 0) {
return cli_main(argc, argv);
}
#endif

6
debian/changelog vendored
View File

@@ -1,3 +1,9 @@
dropbear (0.44test2-1) unstable; urgency=low
* New upstream beta, various minor fixes.
-- Matt Johnston <matt@ucc.asn.au> Tues, 17 August 2004 19:00:00 +0800
dropbear (0.44test1-1) unstable; urgency=low
* Upstream beta 0.44test1

View File

@@ -47,10 +47,8 @@ static void printhelp(char * progname) {
"dropbear\n"
"\n"
"Example:\n"
"dropbearconvert openssh dropbear /etc/ssh/ssh_host_rsa_key /etc/dropbear_rsa_host_key\n"
"\n"
"The inputfile and outputfile can be '-' to specify\n"
"standard input or standard output.\n", progname);
"dropbearconvert openssh dropbear /etc/ssh/ssh_host_rsa_key /etc/dropbear_rsa_host_key\n",
progname);
}
#if defined(DBMULTI_dropbearconvert) || !defined(DROPBEAR_MULTI)

16
dss.c
View File

@@ -164,7 +164,10 @@ int buf_dss_verify(buffer* buf, dss_key *key, const unsigned char* data,
unsigned char msghash[SHA1_HASH_SIZE];
hash_state hs;
int ret = DROPBEAR_FAILURE;
mp_int val1, val2, val3, val4;
DEF_MP_INT(val1);
DEF_MP_INT(val2);
DEF_MP_INT(val3);
DEF_MP_INT(val4);
char * string = NULL;
int stringlen;
@@ -281,13 +284,16 @@ void buf_put_dss_sign(buffer* buf, dss_key *key, const unsigned char* data,
unsigned char privkeyhash[SHA512_HASH_SIZE];
unsigned char *privkeytmp;
unsigned char proto_k[SHA512_HASH_SIZE];
mp_int dss_protok;
DEF_MP_INT(dss_protok);
#else
unsigned char kbuf[SHA1_HASH_SIZE];
#endif
mp_int dss_k, dss_m;
mp_int dss_temp1, dss_temp2;
mp_int dss_r, dss_s;
DEF_MP_INT(dss_k);
DEF_MP_INT(dss_m);
DEF_MP_INT(dss_temp1);
DEF_MP_INT(dss_temp2);
DEF_MP_INT(dss_r);
DEF_MP_INT(dss_s);
hash_state hs;
TRACE(("enter buf_put_dss_sign"));

View File

@@ -89,7 +89,10 @@ static void getq(dss_key *key) {
static void getp(dss_key *key, unsigned int size) {
mp_int tempX, tempC, tempP, temp2q;
DEF_MP_INT(tempX);
DEF_MP_INT(tempC);
DEF_MP_INT(tempP);
DEF_MP_INT(temp2q);
int result;
unsigned char *buf;
@@ -148,7 +151,9 @@ static void getp(dss_key *key, unsigned int size) {
static void getg(dss_key * key) {
char printbuf[1000];
mp_int div, h, val;
DEF_MP_INT(div);
DEF_MP_INT(h);
DEF_MP_INT(val);
m_mp_init_multi(&div, &h, &val, NULL);
@@ -185,7 +190,7 @@ static void getg(dss_key * key) {
static void getx(dss_key *key) {
mp_int val;
DEF_MP_INT(val);
char buf[QSIZE];
m_mp_init(&val);

View File

@@ -40,7 +40,9 @@ static void getrsaprime(mp_int* prime, mp_int *primeminus,
rsa_key * gen_rsa_priv_key(unsigned int size) {
rsa_key * key;
mp_int pminus, qminus, lcm;
DEF_MP_INT(pminus);
DEF_MP_INT(qminus);
DEF_MP_INT(lcm);
key = (rsa_key*)m_malloc(sizeof(rsa_key));
@@ -95,7 +97,7 @@ static void getrsaprime(mp_int* prime, mp_int *primeminus,
mp_int* rsa_e, unsigned int size) {
unsigned char *buf;
mp_int temp_gcd;
DEF_MP_INT(temp_gcd);
buf = (unsigned char*)m_malloc(size+1);

View File

@@ -108,13 +108,10 @@ int import_write(const char *filename, sign_key *key, char *passphrase,
static sign_key *dropbear_read(const char* filename) {
buffer * buf = NULL;
int len, maxlen;
FILE *fp = NULL;
sign_key *ret = NULL;
int type;
buf = buf_new(MAX_PRIVKEY_SIZE);
/* buf_readfile knows about "-" */
if (buf_readfile(buf, filename) == DROPBEAR_FAILURE) {
goto error;
}
@@ -163,11 +160,7 @@ static int dropbear_write(const char*filename, sign_key * key) {
buf = buf_new(MAX_PRIVKEY_SIZE);
buf_put_priv_key(buf, key, keytype);
if (strlen(filename) == 1 && filename[0] == '-') {
fp = stdout;
} else {
fp = fopen(filename, "w");
}
fp = fopen(filename, "w");
if (!fp) {
ret = 0;
goto out;

View File

@@ -1,26 +1,6 @@
/*
* Dropbear - a SSH2 server
*
/* Dropbear SSH
* Copyright (c) 2002,2003 Matt Johnston
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE. */
* All rights reserved. See LICENSE for the license. */
#ifndef _OPTIONS_H_
#define _OPTIONS_H_
@@ -139,7 +119,7 @@ etc) slower (perhaps by 50%). Recommended for most small systems. */
#define ENABLE_CLI_PUBKEY_AUTH
/* Random device to use - you must specify _one only_.
* DEV_RANDOM is recommended on hosts with a good /dev/urandom, otherwise use
* DEV_URANDOM is recommended on hosts with a good /dev/urandom, otherwise use
* PRNGD and run prngd, specifying the socket. This device must be able to
* produce a large amount of random data, so using /dev/random or Entropy
* Gathering Daemon (egd) may result in halting, as it waits for more random
@@ -193,7 +173,7 @@ etc) slower (perhaps by 50%). Recommended for most small systems. */
*******************************************************************/
#ifndef DROPBEAR_VERSION
#define DROPBEAR_VERSION "0.44test1"
#define DROPBEAR_VERSION "0.44test2"
#endif
#define LOCAL_IDENT "SSH-2.0-dropbear_" DROPBEAR_VERSION

5
rsa.c
View File

@@ -201,7 +201,8 @@ int buf_rsa_verify(buffer * buf, rsa_key *key, const unsigned char* data,
unsigned int len) {
unsigned int slen;
mp_int rsa_s, rsa_mdash;
DEF_MP_INT(rsa_s);
DEF_MP_INT(rsa_mdash);
mp_int *rsa_em = NULL;
int ret = DROPBEAR_FAILURE;
@@ -262,7 +263,7 @@ void buf_put_rsa_sign(buffer* buf, rsa_key *key, const unsigned char* data,
unsigned int nsize, ssize;
unsigned int i;
mp_int rsa_s;
DEF_MP_INT(rsa_s);
mp_int *rsa_em = NULL;
TRACE(("enter buf_put_rsa_sign"));

View File

@@ -92,6 +92,8 @@ static void sesssigchild_handler(int dummy) {
chansess->exitsignal = WTERMSIG(status);
#ifndef AIX
chansess->exitcore = WCOREDUMP(status);
#else
chansess->exitcore = 0;
#endif
} else {
/* we use this to determine how pid exited */

View File

@@ -44,7 +44,7 @@ static void send_msg_kexdh_reply(mp_int *dh_e);
* that function, then brings the new keys into use */
void recv_msg_kexdh_init() {
mp_int dh_e;
DEF_MP_INT(dh_e);
TRACE(("enter recv_msg_kexdh_init"));
if (!ses.kexstate.recvkexinit) {
@@ -71,9 +71,11 @@ void recv_msg_kexdh_init() {
* See the ietf-secsh-transport draft, section 6, for details */
static void send_msg_kexdh_reply(mp_int *dh_e) {
mp_int dh_y, dh_f;
DEF_MP_INT(dh_y);
DEF_MP_INT(dh_f);
TRACE(("enter send_msg_kexdh_reply"));
m_mp_init_multi(&dh_y, &dh_f, NULL);
gen_kexdh_vals(&dh_f, &dh_y);

View File

@@ -131,7 +131,11 @@ const struct TermCode termcodes[MAX_TERMCODE+1] = {
{IEXTEN, TERMCODE_LOCAL},
{ECHOCTL, TERMCODE_LOCAL},
{ECHOKE, TERMCODE_LOCAL},
#ifdef PENDIN
{PENDIN, TERMCODE_LOCAL},
#else
{0, 0},
#endif
{0, 0}, /* 63 */
{0, 0},
{0, 0},