From 505cf2627cad9700d2565ad83fd017850e129ab9 Mon Sep 17 00:00:00 2001
From: Enrico Mioso <mrkiko.rs@gmail.com>
Date: Wed, 28 Aug 2013 11:26:58 +0200
Subject: [PATCH] dropbear: update to version 2013.58

---
 package/network/services/dropbear/Makefile         |    6 ++---
 .../dropbear/patches/120-openwrt_options.patch     |   27 ++++++++------------
 .../patches/130-ssh_ignore_o_and_x_args.patch      |   21 ---------------
 3 files changed, 14 insertions(+), 40 deletions(-)
 delete mode 100644 package/network/services/dropbear/patches/130-ssh_ignore_o_and_x_args.patch

diff --git a/package/network/services/dropbear/Makefile b/package/network/services/dropbear/Makefile
index b7708b1..afee25c 100644
--- a/package/network/services/dropbear/Makefile
+++ b/package/network/services/dropbear/Makefile
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dropbear
-PKG_VERSION:=2012.55
-PKG_RELEASE:=2
+PKG_VERSION:=2012.58
+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
+PKG_MD5SUM:=8d3579bbbfcea48404a3219643076450
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE libtomcrypt/LICENSE libtommath/LICENSE
diff --git a/package/network/services/dropbear/patches/120-openwrt_options.patch b/package/network/services/dropbear/patches/120-openwrt_options.patch
index 977f631..e568b40 100644
--- a/package/network/services/dropbear/patches/120-openwrt_options.patch
+++ b/package/network/services/dropbear/patches/120-openwrt_options.patch
@@ -5,7 +5,7 @@
   * one of them. */
  #define NON_INETD_MODE
 -#define INETD_MODE
-+/*#define INETD_MODE*/
++/*#define INETD_MODE (disabled in OpenWrt build)*/
  
  /* Setting this disables the fast exptmod bignum code. It saves ~5kB, but is
   * perhaps 20% slower for pubkey operations (it is probably worth experimenting
@@ -23,11 +23,11 @@
  /* Enable "Netcat mode" option. This will forward standard input/output
   * to a remote TCP-forwarded connection */
 -#define ENABLE_CLI_NETCAT
-+/*#define ENABLE_CLI_NETCAT*/
++/*#define ENABLE_CLI_NETCAT (disabled in OpenWrt build)*/
  
- /* 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*/
@@ -38,30 +38,25 @@
  
  /* 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 */
 -#define DO_MOTD
-+/*#define DO_MOTD*/
++/*#define DO_MOTD(disabled in OpenWrt build)*/
  
  /* 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.*/
diff --git a/package/network/services/dropbear/patches/130-ssh_ignore_o_and_x_args.patch b/package/network/services/dropbear/patches/130-ssh_ignore_o_and_x_args.patch
deleted file mode 100644
index 93647a9..0000000
--- a/package/network/services/dropbear/patches/130-ssh_ignore_o_and_x_args.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/cli-runopts.c
-+++ b/cli-runopts.c
-@@ -287,6 +287,10 @@ void cli_getopts(int argc, char ** argv)
- 					debug_trace = 1;
- 					break;
- #endif
-+				case 'o':
-+					next = &dummy;
-+				case 'x':
-+					break;
- 				case 'F':
- 				case 'e':
- 				case 'c':
-@@ -298,7 +302,6 @@ void cli_getopts(int argc, char ** argv)
- #ifndef ENABLE_CLI_LOCALTCPFWD
- 				case 'L':
- #endif
--				case 'o':
- 				case 'b':
- 					next = &dummy;
- 				default:
-- 
1.7.10.4

