title: Mosquitto TLS/SSL SSL3_READ_BYTES: ssl handshake failure, Error: Success and sslv3 alert
body: <p>I tried following the guide shown by <a href="https://mosquitto.org/man/mosquitto-tls-7.html" rel="nofollow">mosquitto</a> but once I launch the mosquitto</p>
  
  <pre><code>mosquitto -c mosquitto.conf
  </code></pre>
  
  <p>which defines port, location of ca.crt, server.crt, server.key</p>
  
  <p>then I followed similar step using the same CA file, to sign the client key and certificate.</p>
  
  <p>Then launched client</p>
  
  <pre><code>mosquitto_pub -p [port] -h localhost --cafile [ca.crt filepath] -t "hello" -m "hello world"
  </code></pre>
  
  <p>when I do it like this without key and certificate I get</p>
  
  <pre><code>Error: Success
  </code></pre>
  
  <p>but when I do it with key and certificate</p>
  
  <pre><code>mosquitto_pub -p [port] -h localhost --cafile [ca.crt filepath] --cert [client.crt path] --key [client1.key path] t "hello" -m "hello world"
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>Error:Success
  </code></pre>
  
  <p>On the server side I See the following errors</p>
  
  <pre><code>... routines:SSL3_READ_BYTES: sslv3 alert certificate unknown
  ... routines:SSL3_READ_BYTES: ssl handshake failure
  </code></pre>