From: Tadeusz Struk <tadeusz.struk@intel.com>
To: herbert@gondor.apana.org.au
Cc: dhowells@redhat.com, linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org,
linux-crypto@vger.kernel.org, tadeusz.struk@intel.com
Subject: [PATCH 2/2] integrity: convert digsig to akcipher api
Date: Wed, 09 Dec 2015 15:52:37 -0800 [thread overview]
Message-ID: <20151209235237.11783.8959.stgit@tstruk-mobl1> (raw)
In-Reply-To: <20151209235226.11783.57073.stgit@tstruk-mobl1>
Convert asymmetric_verify to akcipher api.
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
---
security/integrity/digsig_asymmetric.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/security/integrity/digsig_asymmetric.c b/security/integrity/digsig_asymmetric.c
index 4fec181..55f4830 100644
--- a/security/integrity/digsig_asymmetric.c
+++ b/security/integrity/digsig_asymmetric.c
@@ -92,13 +92,9 @@ int asymmetric_verify(struct key *keyring, const char *sig,
pks.pkey_hash_algo = hdr->hash_algo;
pks.digest = (u8 *)data;
pks.digest_size = datalen;
- pks.nr_mpi = 1;
- pks.rsa.s = mpi_read_raw_data(hdr->sig, siglen);
-
- if (pks.rsa.s)
- ret = verify_signature(key, &pks);
-
- mpi_free(pks.rsa.s);
+ pks.s = sig;
+ pks.s_size = siglen;
+ ret = verify_signature(key, &pks);
key_put(key);
pr_debug("%s() = %d\n", __func__, ret);
return ret;
next prev parent reply other threads:[~2015-12-09 23:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-09 23:52 [PATCH 0/2] crypto: KEYS: convert public key to akcipher api Tadeusz Struk
2015-12-09 23:52 ` [PATCH 1/2] crypto: KEYS: convert public key to the " Tadeusz Struk
2015-12-09 23:52 ` Tadeusz Struk [this message]
2015-12-10 18:25 ` [PATCH 0/2] crypto: KEYS: convert public key to " Mimi Zohar
2015-12-10 18:39 ` Tadeusz Struk
2015-12-10 19:37 ` Mimi Zohar
2015-12-10 21:56 ` Mimi Zohar
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=20151209235237.11783.8959.stgit@tstruk-mobl1 \
--to=tadeusz.struk@intel.com \
--cc=dhowells@redhat.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.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