linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tadeusz Struk <tadeusz.struk@intel.com>
To: Mimi Zohar <zohar@linux.vnet.ibm.com>, dhowells@redhat.com
Cc: herbert@gondor.apana.org.au, linux-kernel@vger.kernel.org,
	linux-security-module@vger.kernel.org,
	linux-crypto@vger.kernel.org
Subject: Re: [PATCH v2 2/2] integrity: convert digsig to akcipher api
Date: Mon, 14 Dec 2015 06:59:02 -0800	[thread overview]
Message-ID: <566ED936.6070801@intel.com> (raw)
In-Reply-To: <1450099487.2702.32.camel@linux.vnet.ibm.com>

On 12/14/2015 05:24 AM, Mimi Zohar wrote:
> On Sat, 2015-12-12 at 18:26 -0800, Tadeusz Struk wrote:
>> Convert asymmetric_verify to akcipher api.
>>
>> Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
>> ---
>>  security/integrity/Kconfig             |    1 +
>>  security/integrity/digsig_asymmetric.c |   10 +++-------
>>  2 files changed, 4 insertions(+), 7 deletions(-)
>>
>> diff --git a/security/integrity/Kconfig b/security/integrity/Kconfig
>> index 73c457b..f0b2463 100644
>> --- a/security/integrity/Kconfig
>> +++ b/security/integrity/Kconfig
>> @@ -36,6 +36,7 @@ config INTEGRITY_ASYMMETRIC_KEYS
>>          select ASYMMETRIC_KEY_TYPE
>>          select ASYMMETRIC_PUBLIC_KEY_SUBTYPE
>>          select PUBLIC_KEY_ALGO_RSA
>> +        select CRYPTO_RSA
>>          select X509_CERTIFICATE_PARSER
>>  	help
>>  	  This option enables digital signature verification using
>> diff --git a/security/integrity/digsig_asymmetric.c b/security/integrity/digsig_asymmetric.c
>> index 4fec181..5629372 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 = hdr->sig;
> 
> Thanks!  With this change, my system is now able to boot.
> 
Thanks Mimi.

David, do you have any comments to this patch set? If not could you ACK please.
Thanks,

-- 
TS

      reply	other threads:[~2015-12-14 15:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-13  2:26 [PATCH v2 0/2] crypto: KEYS: convert public key to akcipher api Tadeusz Struk
2015-12-13  2:26 ` [PATCH v2 1/2] crypto: KEYS: convert public key to the " Tadeusz Struk
2015-12-19 23:49   ` kbuild test robot
2015-12-20 16:53     ` Tadeusz Struk
2015-12-21 20:59     ` Tadeusz Struk
2015-12-22 12:09       ` Herbert Xu
2015-12-22 14:23         ` Tadeusz Struk
2015-12-23  2:33           ` Herbert Xu
2015-12-23  4:57             ` Tadeusz Struk
2015-12-13  2:26 ` [PATCH v2 2/2] integrity: convert digsig to " Tadeusz Struk
2015-12-14 13:24   ` Mimi Zohar
2015-12-14 14:59     ` Tadeusz Struk [this message]

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=566ED936.6070801@intel.com \
    --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 \
    --cc=zohar@linux.vnet.ibm.com \
    /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;
as well as URLs for NNTP newsgroup(s).