You can disable server certificate validation under the TLS configuration.
Assuming you have ticked the "Enable secure (SSL/TLS) connection" box, you can then create a TLS configuration where you can uncheck the "Verify server certificate" box.
But it is probably better to try and fix the underlying issue if possible as this change will technically allow somebody to impersonate the remote server.
That error implies that the hostname you are using either doesn't match any of the entries in the servers certificate or the certificate has some bad data in it.
When you say you can connect with a browser, does it also show an error, but you can choose to ignore it?
Also if you are happy to share the hostname you are connecting to we can have a quick look at the certificate it is returning.