The point of a certificate is that one endpoint can be sure that the other endpoint is who they say they are, and not somebody else.
In the most common case, it is the client which checks that the server presents a valid certificate matching the domain name they connected to, for which the server has the associated private key, and which the client can trace ...
I assume this is linked to this SO question.
You need to look at what you are trying to achieve here.
A broker can user a self signed certificate to identify it's self as long as the clients all have a copy of that certificate to verify it against.
Using a self signed certificate for a client doesn't make much sense because the broker would need to keep a ...
See this Answer to basically the same question on Stack Overflow
For full details read the Mosquitto V2.0.0 release notes.
Basically you need to supply a config file explicitly allowing connections from anywhere other than localhost as part of an improved default security posture from mosquitto.