[DoT] Improve OpenSSL messages
Currently, when OpenSSL (not my code) detects a problem in the certificate, the messages are not very clear. Here, for an expired certificate:
% ./homer.py --dot ns0.ldn-fai.net toto.fr
Traceback (most recent call last):
File "./homer.py", line 365, in <module>
conn = Connection(url, dot=dot, servername=extracheck, verbose=verbose, insecure=insecure, post=post, head=head)
File "./homer.py", line 157, in __init__
self.session.do_handshake()
File "/home/stephane/.local/lib/python3.6/site-packages/OpenSSL/SSL.py", line 1907, in do_handshake
self._raise_ssl_error(self._ssl, result)
File "/home/stephane/.local/lib/python3.6/site-packages/OpenSSL/SSL.py", line 1639, in _raise_ssl_error
_raise_current_error()
File "/home/stephane/.local/lib/python3.6/site-packages/OpenSSL/_util.py", line 54, in exception_from_error_queue
raise exception_type(errors)
OpenSSL.SSL.Error: [('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')]
Not even a mention of expiration :-(