title: Mosquitto OpenSSL handshake failure.
body: <p>I have a Mosquitto 1.4.4 broker hosted in CentOs 6.7. </p>
  
  <p>By following mosquitto docs 
  (<a href="http://mosquitto.org/man/mosquitto-tls-7.html" rel="nofollow noreferrer">http://mosquitto.org/man/mosquitto-tls-7.html</a>) and
  <a href="https://stackoverflow.com/questions/26657319/how-do-you-set-up-encrypted-mosquitto-broker-like-a-webpage-which-has-https">How do you set up encrypted mosquitto broker like a webpage which has https?</a> </p>
  
  <p>I tried to enable encrypted connection between client and mosquitto broker, and got the broker up and running with TLS enabled. </p>
  
  <pre><code>mosquitto version 1.4.4 (build date 2015-09-24 08:08:55+0000) starting
  Config loaded from mosquitto.conf.
  Opening ipv4 listen socket on port 8883.
  Opening ipv6 listen socket on port 8883
  </code></pre>
  
  <p>After distributing the certificate authority certificate ( <code>ca.crt</code> ) , i tried to run a test round with <code>mosquitto_pub</code> in lib_mosquitto, using the command </p>
  
  <pre><code>mosquitto_pub -h x.x.x.x -p 8883 -t topic -m message --cafile ca.crt
  </code></pre>
  
  <p>what i get in the mosquitto broker is </p>
  
  <pre><code>New connection from y.y.y.y on port 8883.
  OpenSSL Error: error:140780E5:SSL routines:SSL23_READ:ssl handshake failure
  Socket error on client &lt;unknown&gt;, disconnecting.
  </code></pre>
  
  <p>What could be the fix? Where have I gone wrong? </p>