<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi All,<br>
    Sorry, send to <a class="moz-txt-link-rfc2396E" href="mailto:openssl-users@openssl.org"><openssl-users@openssl.org></a> missing.<br>
    <div class="moz-forward-container"><br>
      Patrice.<br>
      <br>
      -------- Message transféré --------
      <table class="moz-email-headers-table" cellspacing="0"
        cellpadding="0" border="0">
        <tbody>
          <tr>
            <th nowrap="nowrap" valign="BASELINE" align="RIGHT">Sujet :
            </th>
            <td>Re: openssl s_client connection fails</td>
          </tr>
          <tr>
            <th nowrap="nowrap" valign="BASELINE" align="RIGHT">Date : </th>
            <td>Wed, 18 Nov 2020 11:40:33 +0000</td>
          </tr>
          <tr>
            <th nowrap="nowrap" valign="BASELINE" align="RIGHT">De : </th>
            <td>Matt Caswell <a class="moz-txt-link-rfc2396E" href="mailto:matt@openssl.org"><matt@openssl.org></a></td>
          </tr>
          <tr>
            <th nowrap="nowrap" valign="BASELINE" align="RIGHT">Pour : </th>
            <td><a class="moz-txt-link-abbreviated" href="mailto:openssl-users@openssl.org">openssl-users@openssl.org</a></td>
          </tr>
        </tbody>
      </table>
      <br>
      <br>
      <pre>
On 18/11/2020 11:24, Patrice Guérin wrote:
> 3072988928:error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert
> handshake failure:../ssl/record/rec_layer_s3.c:1407:SSL alert number 40

This is a very generic "something went wrong" alert that is being
received from the server and could be due to any number of issues. Do
you have access to the server in question? If so there may be more clues
in the server logs that might explain it.

> Does anybody have an idea on what's going wrong ?

One thing that springs to mind that often goes wrong is SNI handling.
s_client changed between 1.1.0 and 1.1.1 to always provider SNI by
default. If the server requires SNI then it could explain this
behaviour. Your can add SNI in 1.1.0 by using the "-servername" command
line option followed by the name of the server in question, e.g.

$ openssl s_client -connect <a class="moz-txt-link-abbreviated" href="http://www.openssl.org">www.openssl.org</a> -port 443 -servername
<a class="moz-txt-link-abbreviated" href="http://www.openssl.org">www.openssl.org</a>

Matt


> Thank you in advance.
> Kind regards
> Patrice.


</pre>
    </div>
  </body>
</html>