Tighten dependencies, set a proper CA certificate file path and don't pass socket options we don't support.