I tried following the guide shown by [mosquitto](https://mosquitto.org/man/mosquitto-tls-7.html) but once I launch the mosquitto

```
mosquitto -c mosquitto.conf

```

which defines port, location of ca.crt, server.crt, server.key

then I followed similar step using the same CA file, to sign the client key and certificate.

Then launched client

```
mosquitto_pub -p [port] -h localhost --cafile [ca.crt filepath] -t "hello" -m "hello world"

```

when I do it like this without key and certificate I get

```
Error: Success

```

but when I do it with key and certificate

```
mosquitto_pub -p [port] -h localhost --cafile [ca.crt filepath] --cert [client.crt path] --key [client1.key path] t "hello" -m "hello world"

```

I get

```
Error:Success

```

On the server side I See the following errors

```
... routines:SSL3_READ_BYTES: sslv3 alert certificate unknown
... routines:SSL3_READ_BYTES: ssl handshake failure

```