lkml.org 
[lkml]   [2021]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] crypto: ecdh - fix 'ecdh_init'
On Wed, May 12, 2021 at 02:40:00PM +0800, Hui Tang wrote:
> NIST P192 is not unregistered if failed to register NIST P256,
> actually it need to unregister the algorithms already registered.
>
> Signed-off-by: Hui Tang <tanghui20@huawei.com>
> ---
> crypto/ecdh.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)

Thanks for catching this. The variable ecdh_nist_p192_registered
is bogus. You should just make it so that if p192 fails to
register then the init function aborts. There would then be
no need to check for the registered state in the exit function.

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

\
 
 \ /
  Last update: 2021-05-21 09:48    [W:0.709 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site