Initialise SSL context
Clean buffer when closing connection
Add some more debugging
Perform client certificate validation
Add code to load settings from file
Use log_msg_ for all errors