mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 1/7] command: digest: only set the key when specified
Date: Tue, 24 Mar 2015 14:08:33 +0100	[thread overview]
Message-ID: <1427202519-15224-1-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <20150324130035.GB8125@ns203013.ovh.net>

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 commands/digest.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/commands/digest.c b/commands/digest.c
index 876c37a..90e68a1 100644
--- a/commands/digest.c
+++ b/commands/digest.c
@@ -147,10 +147,12 @@ static int do_digest(int argc, char *argv[])
 		}
 	}
 
-	ret = digest_set_key(d, key, keylen);
-	free(tmp_key);
-	if (ret)
-		goto err;
+	if (key) {
+		ret = digest_set_key(d, key, keylen);
+		free(tmp_key);
+		if (ret)
+			goto err;
+	}
 
 	if (sigfile) {
 		sig = tmp_sig = read_file(sigfile, &siglen);
-- 
2.1.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2015-03-24 13:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-24 13:00 [PATCH 0/7 v2] digest: allow multiple implementation of digest Jean-Christophe PLAGNIOL-VILLARD
2015-03-24 13:08 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2015-03-24 13:08   ` [PATCH 2/7] crypto: prepare to allow multiple digest driver Jean-Christophe PLAGNIOL-VILLARD
2015-03-24 13:08   ` [PATCH 3/7] crypto: sha1: switch to linux implementation Jean-Christophe PLAGNIOL-VILLARD
2015-03-25  9:06     ` Sascha Hauer
2015-03-24 13:08   ` [PATCH 4/7] crypto: sha256: " Jean-Christophe PLAGNIOL-VILLARD
2015-03-24 13:08   ` [PATCH 5/7] crypto: sha512: " Jean-Christophe PLAGNIOL-VILLARD
2015-03-24 13:08   ` [PATCH 6/7] arm: crypto: add sha1 assembly support Jean-Christophe PLAGNIOL-VILLARD
2015-03-24 13:08   ` [PATCH 7/7] arm: crypto: add sha256 " Jean-Christophe PLAGNIOL-VILLARD
2015-03-25  2:55 ` [PATCH 0/7 v2] digest: allow multiple implementation of digest Jean-Christophe PLAGNIOL-VILLARD
2015-03-25 10:26 ` Sascha Hauer
2015-03-25 11:44   ` Jean-Christophe PLAGNIOL-VILLARD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1427202519-15224-1-git-send-email-plagnioj@jcrosoft.com \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox