t;SHA384&quot;, 0);
params[4] = OSSL_PARAM_construct_end();
EVP_PKEY_CTX_set_params(pctx, params);

EVP_PKEY_generate(pctx, &amp;param_key);
EVP_PKEY_CTX_free(pctx);

EVP_PKEY_print_params(bio_out, param_key, 0, NULL);</code></pre>

<p>A <b>DSA</b> key can be generated using domain parameters by calling:</p>

<pre><code>EVP_PKEY *key = NULL;
EVP_PKEY_CTX *gctx = NULL;

gctx = EVP_PKEY_CTX_new_from_pkey(NULL, param_key, NULL);
EVP_PKEY_keygen_init(gctx);
EVP_PKEY_generate(gctx, &amp;key);
EVP_PKEY_CTX_free(g