Coverity 1463571: Null pointer dereferences (FORWARD_NULL)
[openssl.git] / providers / implementations / keymgmt / rsa_kmgmt.c
index b237b2784faf43b3427bd14d32b5b5b71895f03c..3091c1dee092b1ac0713cf2ce3e0f2f230e68ba5 100644 (file)
@@ -411,8 +411,8 @@ static void *gen_init(void *provctx, int selection, int rsa_type)
         } else {
             gctx->nbits = 2048;
             gctx->primes = RSA_DEFAULT_PRIME_NUM;
         } else {
             gctx->nbits = 2048;
             gctx->primes = RSA_DEFAULT_PRIME_NUM;
+            gctx->rsa_type = rsa_type;
         }
         }
-        gctx->rsa_type = rsa_type;
     }
     return gctx;
 }
     }
     return gctx;
 }