From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from moutng.kundenserver.de ([212.227.126.186]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1UKTaD-0007dI-DE for ptxdist@pengutronix.de; Tue, 26 Mar 2013 14:06:34 +0100 From: Alexander Dahl Date: Tue, 26 Mar 2013 14:05:25 +0100 Message-Id: <1364303125-4866-5-git-send-email-post@lespocky.de> In-Reply-To: <1364303125-4866-1-git-send-email-post@lespocky.de> References: <1364303125-4866-1-git-send-email-post@lespocky.de> Subject: [ptxdist] [PATCH 4/4] add options for recently added SHA256 and SHA512 hashes Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de Make new hash functions available through ptxdist config menu. Signed-off-by: Alexander Dahl --- rules/dropbear.in | 26 ++++++++++++++++++++++++++ rules/dropbear.make | 16 ++++++++++++++++ 2 files changed, 42 insertions(+), 0 deletions(-) diff --git a/rules/dropbear.in b/rules/dropbear.in index 8c878ec..21301ba 100644 --- a/rules/dropbear.in +++ b/rules/dropbear.in @@ -232,6 +232,32 @@ config DROPBEAR_SHA1_96 Although slower than MD5, this larger digest size makes it stronger against brute force attacks. +config DROPBEAR_SHA256 + bool + prompt "sha256" + default n + help + SHA-2 is a set of cryptographic hash functions (SHA-224, SHA-256, + SHA-384, SHA-512) designed by the National Security Agency (NSA) + and published in 2001 by the NIST as a U.S. Federal Information + Processing Standard. SHA stands for Secure Hash Algorithm. SHA-2 + includes a significant number of changes from its predecessor, + SHA-1. SHA-2 consists of a set of four hash functions with digests + that are 224, 256, 384 or 512 bits. + +config DROPBEAR_SHA512 + bool + prompt "sha512" + default n + help + SHA-2 is a set of cryptographic hash functions (SHA-224, SHA-256, + SHA-384, SHA-512) designed by the National Security Agency (NSA) + and published in 2001 by the NIST as a U.S. Federal Information + Processing Standard. SHA stands for Secure Hash Algorithm. SHA-2 + includes a significant number of changes from its predecessor, + SHA-1. SHA-2 consists of a set of four hash functions with digests + that are 224, 256, 384 or 512 bits. + config DROPBEAR_MD5 bool prompt "md5" diff --git a/rules/dropbear.make b/rules/dropbear.make index 2beb7ef..74f273f 100644 --- a/rules/dropbear.make +++ b/rules/dropbear.make @@ -181,6 +181,22 @@ else @$(call disable_c, $(DROPBEAR_DIR)/options.h,DROPBEAR_SHA1_96_HMAC) endif +ifdef PTXCONF_DROPBEAR_SHA256 + @echo "ptxdist: enabling sha256" + @$(call enable_c, $(DROPBEAR_DIR)/options.h,DROPBEAR_SHA2_256_HMAC) +else + @echo "ptxdist: disabling sha256" + @$(call disable_c, $(DROPBEAR_DIR)/options.h,DROPBEAR_SHA2_256_HMAC) +endif + +ifdef PTXCONF_DROPBEAR_SHA512 + @echo "ptxdist: enabling sha512" + @$(call enable_c, $(DROPBEAR_DIR)/options.h,DROPBEAR_SHA2_512_HMAC) +else + @echo "ptxdist: disabling sha512" + @$(call disable_c, $(DROPBEAR_DIR)/options.h,DROPBEAR_SHA2_512_HMAC) +endif + ifdef PTXCONF_DROPBEAR_MD5 @echo "ptxdist: enabling md5" @$(call enable_c, $(DROPBEAR_DIR)/options.h,DROPBEAR_MD5_HMAC) -- 1.7.2.5 -- ptxdist mailing list ptxdist@pengutronix.de