Commit eb5798f2 authored by Tadeusz Struk's avatar Tadeusz Struk Committed by David Howells

integrity: convert digsig to akcipher api

Convert asymmetric_verify to akcipher api.
Signed-off-by: default avatarTadeusz Struk <tadeusz.struk@intel.com>
Acked-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
parent db6c43bd
...@@ -36,6 +36,7 @@ config INTEGRITY_ASYMMETRIC_KEYS ...@@ -36,6 +36,7 @@ config INTEGRITY_ASYMMETRIC_KEYS
select ASYMMETRIC_KEY_TYPE select ASYMMETRIC_KEY_TYPE
select ASYMMETRIC_PUBLIC_KEY_SUBTYPE select ASYMMETRIC_PUBLIC_KEY_SUBTYPE
select PUBLIC_KEY_ALGO_RSA select PUBLIC_KEY_ALGO_RSA
select CRYPTO_RSA
select X509_CERTIFICATE_PARSER select X509_CERTIFICATE_PARSER
help help
This option enables digital signature verification using This option enables digital signature verification using
......
...@@ -106,13 +106,9 @@ int asymmetric_verify(struct key *keyring, const char *sig, ...@@ -106,13 +106,9 @@ int asymmetric_verify(struct key *keyring, const char *sig,
pks.pkey_hash_algo = hdr->hash_algo; pks.pkey_hash_algo = hdr->hash_algo;
pks.digest = (u8 *)data; pks.digest = (u8 *)data;
pks.digest_size = datalen; pks.digest_size = datalen;
pks.nr_mpi = 1; pks.s = hdr->sig;
pks.rsa.s = mpi_read_raw_data(hdr->sig, siglen); pks.s_size = siglen;
ret = verify_signature(key, &pks);
if (pks.rsa.s)
ret = verify_signature(key, &pks);
mpi_free(pks.rsa.s);
key_put(key); key_put(key);
pr_debug("%s() = %d\n", __func__, ret); pr_debug("%s() = %d\n", __func__, ret);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment