You can use the OpenSSL command line tool for testing, e.g. as a starting point:
$ openssl s_client -connect example.com:443 -verify 1 -tls1_2
Where:
-tls1_2 - just use TLSv1.2
The help (openssl s_client -h
or man s_client
) describes many other options - you can e.g. specifiy a ciphers-list - also something a restrictive/modern client/server may explicitly set and which thus might yield failed connections - especially when connecting to/from an old server/client.
An example that shows the different outcomes:
$ echo | openssl s_client -verify 1 -connect www.cebitec.uni-bielefeld.de:443
[..]
verify return:1
[..]
SSL-Session:
Protocol : TLSv1
Cipher : AES128-SHA
Session-ID: [non-empty]
[..]
---
DONE
$ echo $?
0
This was without enforcing a minimal version, now with TLS 1.2 requirement:
$ echo \
| openssl s_client -verify 1 -tls1_2 -connect www.cebitec.uni-bielefeld.de:443
[..]
[..]:SSL routines:SSL3_GET_RECORD:wrong version number:s3_pkt.c:347:
--
no peer certificate available
[..]
SSL-Session:
Protocol : TLSv1.2
Cipher : 0000
Session-ID:
Session-ID-ctx:
Master-Key:
[..]
---
$ echo $?
1
Meaning that the server does not support TLS 1.2.
Probably because it uses an quite old version of openssl.