On Thu, Aug 13, 2015 at 03:23:16PM +0100, David Howells wrote:
quoted
- /* 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 [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt