Lambdor pr 124

This is a copy of PR #124 , merged back into the main branch, and with some tweaks and changes.

@lambdor - Feel free to review or comment on my changes added here. Because of #143 I propose we do the following:

* hide the 'distrust all certificates' functionality for now
* release this as a new release
* fix #143 
* re-enable 'distrust all certs' and send out another release again

Comments welcome.