Cleanup strings.
Add support for self signed certs. Closes #5391.
Merge remote-tracking branch 'refs/remotes/ivan/feature/5391_support-selfsigned-certs' into develop