<div dir="ltr">Thanks Matt,<div><br></div><div>So now I have, which i believe is enough ?</div><div><br></div><div>SSL_CTX_set_options(s_ctx,  SSL_OP_NO_RENEGOTIATION | SSL_OP_CIPHER_SERVER_PREFERENCE);</div><div>SSL_CTX_set_min_proto_version(s_ctx, TLS1_2_VERSION);<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 6, 2019 at 3:04 PM Matt Caswell <<a href="mailto:matt@openssl.org">matt@openssl.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
On 06/08/2019 09:42, Chitrang Srivastava wrote:<br>
> Hi,<br>
> <br>
> I am implementing HTTPs server using openssl 1.1.1b.<br>
> Is it mandatory to setup these API's while creating ssl context ?<br>
> <br>
> SSL_CTX_set_tmp_ecdh<br>
> <br>
> SSL_CTX_set_tmp_dh<br>
<br>
By default OpenSSL will automatically use ECDH if appropriate and choose a<br>
suitable group so there is no need to call SSL_CTX_set_tmp_ecdh() unless you<br>
want more control over which specific group is used.<br>
<br>
OpenSSL will not use DH unless you specifically configure it. If you want to<br>
make use of DH based ciphersuites then you must either call SSL_CTX_set_tmp_dh()<br>
or SSL_CTX_set_dh_auto() (or the SSL_* equivalents). Calling the former enables<br>
you to configure any arbitrary DH group that you choose. Calling the latter will<br>
enable the built-in DH groups.<br>
<br>
It is not mandatory to call any of the above.<br>
<br>
> <br>
> Also any suggestion what all options one should set while setting up server like<br>
> SSL_CTX_set_options like SSL_OP_NO_SSLv2 |SSL_OP_NO_SSLv3<br>
<br>
Don't use the protocol version specific options at all. Use<br>
SSL_CTX_set_min_proto_version() if you want to specify a minimum protocol<br>
version. SSLv2 is no longer supported at all. SSLv3 is compiled out by default.<br>
<br>
Other options that are worth considering are SSL_OP_NO_RENEGOTIATION and<br>
(possibly) SSL_OP_CIPHER_SERVER_PREFERENCE. Generally you don't need the others<br>
unless there is a specific problem you are trying to solve.<br>
<br>
Matt<br>
</blockquote></div>