providers/implementations/keymgmt/rsa_kmgmt.c: refactor gen_init
authorPeiwei Hu <jlu.hpw@foxmail.com>
Thu, 6 Jan 2022 01:47:05 +0000 (09:47 +0800)
committerPauli <ppzgs1@gmail.com>
Fri, 7 Jan 2022 10:08:13 +0000 (21:08 +1100)
commit22778abad905536fa6c93cdc6fffc8c736dfee79
tree15342dee292c381910b38d6074ffe00ddbeb9c92
parent6e98b7f153fcf9dfad1053fbb3a592166837c6fc
providers/implementations/keymgmt/rsa_kmgmt.c: refactor gen_init

There is risk to pass the gctx with NULL value to rsa_gen_set_params
which dereference gctx directly.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17429)
providers/implementations/keymgmt/rsa_kmgmt.c