title: What could cause "dh key too small" error?
body: <p>I coded a program that uses openssl, and dockerized it.   </p>
  
  <p>But when I tried it with python:3.7 base image, the below error occured:   </p>
  
  <blockquote>
    <p>[SSL: DH_KEY_TOO_SMALL] dh key too small (_ssl.c:1108)</p>
  </blockquote>
  
  <p>I managed to solve this by lowering security level in <code>/etc/ssl/openssl.cnf</code> file.  </p>
  
  <p><code>echo "CipherString=DEFAULT@SECLEVEL=1" &gt;&gt; /etc/ssl/openssl.cnf</code> </p>
  
  <p>But what exactly does this error mean?   </p>
  
  <p>Is this a server-side problem, which I cannot handle in my code?   </p>
  
  <p>I'm just not feeling that comfortable with resolving a problem by just lowering a security level.   </p>
  
  <p>What should I consider when changing that security level?   </p>
  
  <p>Thanks :)</p>