I am trying to connect lora components to MQTT broker (VerneMQ) with self-signed certificates.
I can connect to the broker with CA file with MQTT.fx without any problems, but when I add to the config
I get openssl errors (
ERRO handler/mqtt: connecting to broker error, will retry in 2s: Network Error : x509: cannot validate certificate for 127.0.0.1 because it doesn't contain any IP SANs
ERRO handler/mqtt: connecting to broker error, will retry in 2s: Network Error : x509: certificate is valid for vernemq, not localhost
Broker logs for this are (no messages for mqtt.fx connection):
2018-11-22 08:34:04.890 [info] <0.546.0> TLS server: In state certify received CLIENT ALERT: Fatal - Bad Certificate
What is the best way to solve this problem?