<div dir="ltr"><div>Hello everybody,</div><div><br></div><div>I'm trying to force openssl s_server to use DH p parameter of 2048 bits length, but I can't find the way to do it.</div><div>I've noticed that the length of p parameter depends on chosen cipher. </div><div>For example, if I'm using DHE_PSK_WITH_AES_128_CBC_SHA256 the length of p parameter is 1024 bits,</div><div>but if I'm using DHE_PSK_WITH_AES_256_CBC_SHA384 the length is 3072 bits.</div><div><br></div><div>I've tried to generate DH parameters PEM file by the following command:</div><div><font size="1"><p><strong>openssl genpkey -genparam -algorithm DH -out /tmp/test_dh_params.pem -pkeyopt dh_paramgen_prime_len:2048</strong></p></font></div><div><span><span>And to load the file to s_server by:</span></span></div><font size="1"><p><strong>openssl s_server -state -trace -dhparam /tmp/test_dh_params.pem -accept 443 -psk 1a2b3c4d -nocert</strong></p></font><div><span><span><span><span>But I'm getting an error:</span></span></span></span></div><font size="1"><p><strong>Error with command: "-dhparam /tmp/test_dh_params.pem"</strong></p></font><div><span><span><span><span><span><span>Is there an easy way to do what I'm trying to do?</span></span></span></span></span></span></div><div><span><span><span><span><span><span>Any help would be appreciated.</span></span></span></span></span></span></div><p>Best regards.</p><span><p><br></p><span><p><br></p><span><p><br></p><span><p><br></p><span><p><br></p><span><p><br></p><div><br></div></span></span></span></span></span></span></div>