Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1207273

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

From Herbert Xu <herbert@gondor.apana.org.au>
Newsgroups linux.kernel
Subject Re: [PATCH 1/2] crypto: KEYS: convert public key to the akcipher API
Date 2015-08-14 03:10 +0200
Message-ID <pXbFo-3wZ-13@gated-at.bofh.it> (permalink)
References <pWRQm-8uz-15@gated-at.bofh.it> <pWRQm-8uz-5@gated-at.bofh.it> <pX1G2-5TR-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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@gondor.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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] crypto: KEYS: convert public key to the akcipher API Tadeusz Struk <tadeusz.struk@intel.com> - 2015-08-13 06:00 +0200
  [PATCH 1/2] crypto: KEYS: convert public key to the akcipher API Tadeusz Struk <tadeusz.struk@intel.com> - 2015-08-13 06:00 +0200
    Re: [PATCH 1/2] crypto: KEYS: convert public key to the akcipher API David Howells <dhowells@redhat.com> - 2015-08-13 16:30 +0200
      Re: [PATCH 1/2] crypto: KEYS: convert public key to the akcipher  API Tadeusz Struk <tadeusz.struk@intel.com> - 2015-08-13 18:50 +0200
      Re: [PATCH 1/2] crypto: KEYS: convert public key to the akcipher API Herbert Xu <herbert@gondor.apana.org.au> - 2015-08-14 03:10 +0200
    Re: [PATCH 1/2] crypto: KEYS: convert public key to the akcipher API Stephan Mueller <smueller@chronox.de> - 2015-08-15 20:10 +0200
  Re: [PATCH 0/2] crypto: KEYS: convert public key to the akcipher API David Howells <dhowells@redhat.com> - 2015-08-13 16:00 +0200
    Re: [PATCH 0/2] crypto: KEYS: convert public key to the akcipher  API Tadeusz Struk <tadeusz.struk@intel.com> - 2015-08-13 18:50 +0200

csiph-web