[PATCH 1/2] crypto: KEYS: convert public key to the akcipher api

2015-12-09 Thread Tadeusz Struk
This patch converts the module verification code to the new akcipher API. Signed-off-by: Tadeusz Struk --- crypto/asymmetric_keys/Kconfig|2 crypto/asymmetric_keys/Makefile |7 - crypto/asymmetric_keys/pkcs7_parser.c | 12 +- crypto/asymmetric_keys/pkcs7_trus

Re: [PATCH 1/2] crypto: KEYS: convert public key to the akcipher API

2015-08-24 Thread Tadeusz Struk
Hi Stephan, On 08/15/2015 11:08 AM, Stephan Mueller wrote: > Am Mittwoch, 12. August 2015, 20:54:39 schrieb Tadeusz Struk: > > Hi Tadeusz, > >> @@ -41,7 +41,7 @@ struct pkcs7_parse_context { >> static void pkcs7_free_signed_info(struct pkcs7_signed_info *sinfo) >> { >> if (sinfo) { >> -

Re: [PATCH 1/2] crypto: KEYS: convert public key to the akcipher API

2015-08-15 Thread Stephan Mueller
Am Mittwoch, 12. August 2015, 20:54:39 schrieb Tadeusz Struk: Hi Tadeusz, >@@ -41,7 +41,7 @@ struct pkcs7_parse_context { > static void pkcs7_free_signed_info(struct pkcs7_signed_info *sinfo) > { > if (sinfo) { >- mpi_free(sinfo->sig.mpi[0]); >+ kfree(sinfo->sig.s)

Re: [PATCH 1/2] crypto: KEYS: convert public key to the akcipher API

2015-08-13 Thread Herbert Xu
On Thu, Aug 13, 2015 at 03:23:16PM +0100, David Howells wrote: > > > - /* Decode the public key */ > > - ret = asn1_ber_decoder(&x509_rsakey_decoder, ctx, > > - ctx->key, ctx->key_size); > > - if (ret < 0) > > + cert->pub->key = kmemdup(ctx->key, ctx->key_size, GFP

Re: [PATCH 1/2] crypto: KEYS: convert public key to the akcipher API

2015-08-13 Thread Tadeusz Struk
On 08/13/2015 07:23 AM, David Howells wrote: > Tadeusz Struk wrote: > >> const char *const pkey_algo_name[PKEY_ALGO__LAST] = { >> -[PKEY_ALGO_DSA] = "DSA", >> -[PKEY_ALGO_RSA] = "RSA", >> +[PKEY_ALGO_DSA] = "dsa", >> +[PKEY_ALGO_RSA] = "rsa", >> }

Re: [PATCH 1/2] crypto: KEYS: convert public key to the akcipher API

2015-08-13 Thread David Howells
Tadeusz Struk wrote: > const char *const pkey_algo_name[PKEY_ALGO__LAST] = { > - [PKEY_ALGO_DSA] = "DSA", > - [PKEY_ALGO_RSA] = "RSA", > + [PKEY_ALGO_DSA] = "dsa", > + [PKEY_ALGO_RSA] = "rsa", > }; Be aware that these are exposed to userspace thr

[PATCH 1/2] crypto: KEYS: convert public key to the akcipher API

2015-08-12 Thread Tadeusz Struk
This patch converts the module verification code to the new akcipher API. RSA implementation from crypto/asymmetric_keys has been removed and the new API is used for cryptographic primitives. The signature verification has been moved into a new crypto/asymmetric_keys/rsa_pkcs1_v1_5.c file. There is