The most likely cause (I know for a fact the example code used to work ad verbatim on linux) is that the certificate or the connection encryption is not correct or refused because of unsafe algorithms.
E.g. if the server is running an updated version of openssl (1.0.0g or 1.1) you can't use most of the algorithms that are deemed unsafe.
The connection will never take place. Not even a refusal, but dropped. Hence no errors.
E.g. SSLv2 won't work anymore, not even in the protocol fallback chain. RC4 won't work anymore, more hash related things are refused. You really need e.g. tls 1.2 and the max fallback is tls 1.1. This has a huge impact on SSH and SSH2.
See release notes at openssl.org for openssl v1.1.
In synapse there is a setting to always use the highest encryption possible. (Forgot the name) if you set that, everything will be OK, at least with openssl.