diff --git a/winpr/tools/makecert/makecert.c b/winpr/tools/makecert/makecert.c index 15a2d16c8..94795160e 100644 --- a/winpr/tools/makecert/makecert.c +++ b/winpr/tools/makecert/makecert.c @@ -730,12 +730,14 @@ static BOOL makecert_create_rsa(EVP_PKEY** ppkey, size_t key_length) if (EVP_PKEY_keygen_init(pctx) != 1) goto fail; - WINPR_ASSERT(key_length <= UINT_MAX); - unsigned int keylen = (unsigned int)key_length; - const OSSL_PARAM params[] = { OSSL_PARAM_construct_uint("bits", &keylen), - OSSL_PARAM_construct_end() }; - if (EVP_PKEY_CTX_set_params(pctx, params) != 1) - goto fail; + { + WINPR_ASSERT(key_length <= UINT_MAX); + unsigned int keylen = (unsigned int)key_length; + const OSSL_PARAM params[] = { OSSL_PARAM_construct_uint("bits", &keylen), + OSSL_PARAM_construct_end() }; + if (EVP_PKEY_CTX_set_params(pctx, params) != 1) + goto fail; + } if (EVP_PKEY_generate(pctx, ppkey) != 1) goto fail;