cleaned up ssl bits, --check-certificate command line flag works again