Fix certificate verification error when set to False

Fixes BZ 1155192

Unable to write tests because PulpConnection can't be imported easily