From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 1/4] command: digest: only set the key when specified
Date: Tue, 24 Mar 2015 10:19:25 +0100 [thread overview]
Message-ID: <1427188768-18012-1-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <20150324091655.GA8125@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
next prev parent reply other threads:[~2015-03-24 9:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-24 9:16 [PATCH 0/4] digest: allow multiple implementation of digest Jean-Christophe PLAGNIOL-VILLARD
2015-03-24 9:19 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2015-03-24 9:19 ` [PATCH 2/4] crypto: prepare to allow multiple digest driver Jean-Christophe PLAGNIOL-VILLARD
2015-03-24 9:19 ` [PATCH 3/4] crypto: sha1: switch to linux implementation Jean-Christophe PLAGNIOL-VILLARD
2015-03-24 9:19 ` [PATCH 4/4] arm: crypto: add sha1 assembly support 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=1427188768-18012-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