include $(TOPDIR)/rules.mk
PKG_NAME:=dropbear
-PKG_VERSION:=2012.55
-PKG_RELEASE:=2
+PKG_VERSION:=2013.59
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:= \
- http://matt.ucc.asn.au/dropbear/releases/ \
- http://www.mirrors.wiretapped.net/security/cryptography/apps/ssh/dropbear/
-PKG_MD5SUM:=8c784baec3054cdb1bb4bfa792c87812
+ http://matt.ucc.asn.au/dropbear/releases/
+PKG_MD5SUM:=6c1e6c2c297f4034488ffc95e8b7e6e9
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE libtomcrypt/LICENSE libtommath/LICENSE
--- a/svr-chansession.c
+++ b/svr-chansession.c
-@@ -891,12 +891,12 @@ static void execchild(void *user_data) {
+@@ -889,12 +889,12 @@ static void execchild(void *user_data) {
/* We can only change uid/gid as root ... */
if (getuid() == 0) {
-#define ENABLE_CLI_NETCAT
+/*#define ENABLE_CLI_NETCAT*/
- /* Encryption - at least one required.
- * Protocol RFC requires 3DES and recommends AES128 for interoperability.
-@@ -89,8 +89,8 @@ much traffic. */
+ /* Whether to support "-c" and "-m" flags to choose ciphers/MACs at runtime */
+ #define ENABLE_USER_ALGO_LIST
+@@ -92,8 +92,8 @@ much traffic. */
#define DROPBEAR_AES256
/* Compiling in Blowfish will add ~6kB to runtime heap memory usage */
/*#define DROPBEAR_BLOWFISH*/
/* Enable "Counter Mode" for ciphers. This is more secure than normal
* CBC mode against certain attacks. This adds around 1kB to binary
-@@ -110,7 +110,7 @@ much traffic. */
+@@ -119,7 +119,7 @@ much traffic. */
* If you disable MD5, Dropbear will fall back to SHA1 fingerprints,
* which are not the standard form. */
#define DROPBEAR_SHA1_HMAC
-#define DROPBEAR_SHA1_96_HMAC
+/*#define DROPBEAR_SHA1_96_HMAC*/
+ /*#define DROPBEAR_SHA2_256_HMAC*/
+ /*#define DROPBEAR_SHA2_512_HMAC*/
#define DROPBEAR_MD5_HMAC
-
- /* Hostkey/public key algorithms - at least one required, these are used
-@@ -144,11 +144,11 @@ much traffic. */
- #endif
-
- /* Whether to do reverse DNS lookups. */
--#define DO_HOST_LOOKUP
-+/*#define DO_HOST_LOOKUP*/
+@@ -157,7 +157,7 @@ much traffic. */
/* Whether to print the message of the day (MOTD). This doesn't add much code
* size */
/* The MOTD file path */
#ifndef MOTD_FILENAME
-@@ -192,7 +192,7 @@ much traffic. */
+@@ -195,7 +195,7 @@ much traffic. */
* note that it will be provided for all "hidden" client-interactive
* style prompts - if you want something more sophisticated, use
* SSH_ASKPASS instead. Comment out this var to remove this functionality.*/
--- a/cli-runopts.c
+++ b/cli-runopts.c
-@@ -287,6 +287,10 @@ void cli_getopts(int argc, char ** argv)
+@@ -309,6 +309,10 @@ void cli_getopts(int argc, char ** argv)
debug_trace = 1;
break;
#endif
+ break;
case 'F':
case 'e':
- case 'c':
-@@ -298,7 +302,6 @@ void cli_getopts(int argc, char ** argv)
+ #ifndef ENABLE_USER_ALGO_LIST
+@@ -322,7 +326,6 @@ void cli_getopts(int argc, char ** argv)
#ifndef ENABLE_CLI_LOCALTCPFWD
case 'L':
#endif
--- a/dbutil.h
+++ b/dbutil.h
-@@ -93,6 +93,10 @@ int m_str_to_uint(const char* str, unsig
+@@ -92,7 +92,11 @@ int m_str_to_uint(const char* str, unsig
#define DEF_MP_INT(X) mp_int X = {0, 0, 0, NULL}
/* Dropbear assertion */
+
+#define dropbear_assert(X) do { if (DROPBEAR_ASSERT_ENABLED && !(X)) { fail_assert(#X, __FILE__, __LINE__); } } while (0)
- #endif /* _DBUTIL_H_ */
+ /* Returns 0 if a and b have the same contents */
+ int constant_time_memcmp(const void* a, const void *b, size_t n);
dbclientobjs=$(COMMONOBJS) $(CLISVROBJS) $(CLIOBJS)
dropbearkeyobjs=$(COMMONOBJS) $(KEYOBJS)
dropbearconvertobjs=$(COMMONOBJS) $(CONVERTOBJS)
-@@ -77,7 +77,7 @@ STRIP=@STRIP@
+@@ -78,7 +78,7 @@ STRIP=@STRIP@
INSTALL=@INSTALL@
CPPFLAGS=@CPPFLAGS@
CFLAGS+=-I. -I$(srcdir) $(CPPFLAGS) @CFLAGS@
LDFLAGS=@LDFLAGS@
EXEEXT=@EXEEXT@
-@@ -169,7 +169,7 @@ scp: $(SCPOBJS) $(HEADERS) Makefile
+@@ -168,7 +168,7 @@ scp: $(SCPOBJS) $(HEADERS) Makefile
# multi-binary compilation.
MULTIOBJS=
ifeq ($(MULTI),1)
+++ /dev/null
---- a/svr-runopts.c
-+++ b/svr-runopts.c
-@@ -325,7 +325,7 @@ static void addportandaddress(char* spec
- myspec = m_strdup(spec);
-
- /* search for ':', that separates address and port */
-- svr_opts.ports[svr_opts.portcount] = strchr(myspec, ':');
-+ svr_opts.ports[svr_opts.portcount] = strrchr(myspec, ':');
-
- if (svr_opts.ports[svr_opts.portcount] == NULL) {
- /* no ':' -> the whole string specifies just a port */
--- a/options.h
+++ b/options.h
-@@ -297,7 +297,7 @@ be overridden at runtime with -I. 0 disa
+@@ -301,7 +301,7 @@ be overridden at runtime with -I. 0 disa
#define DEFAULT_IDLE_TIMEOUT 0
/* The default path. This will often get replaced by the shell */