[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150814010916.GA333@gondor.apana.org.au>
Date: Fri, 14 Aug 2015 09:09:16 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: David Howells <dhowells@...hat.com>
Cc: Tadeusz Struk <tadeusz.struk@...el.com>, keescook@...omium.org,
jwboyer@...hat.com, smueller@...onox.de, richard@....at,
steved@...hat.com, linux-kernel@...r.kernel.org,
linux-crypto@...r.kernel.org, james.l.morris@...cle.com,
jkosina@...e.cz, zohar@...ux.vnet.ibm.com, davem@...emloft.net,
vgoyal@...hat.com
Subject: Re: [PATCH 1/2] crypto: KEYS: convert public key to the akcipher API
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_KERNEL);
> > + if (!cert->pub->key)
> > goto error_decode;
>
> The generic public key code should *not* see the container wrappings (ASN.1
> from an X.509 cert in this case). The public key could be supplied by OpenPGP
> instead, for example, or directly by a driver.
No in this case it's fine because the format of our key input
specification just happens to coincide with the input here.
Cheers,
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists