public function verifySslPeer($verify_ssl_peer = true, $custom_ca_file = null)
    {
        if ($custom_ca_file) {
            if (!is_file($custom_ca_file)) {
                throw new \InvalidArgumentException('Custom CA file does not exist');
            }

            if (!$verify_ssl_peer) {
                throw new \LogicException('Custom CA file should not be set if SSL peer is not verified');
            }
        }

        $this->verify_ssl_peer = (boolean) $verify_ssl_peer;
        $this->custom_ca_file = $custom_ca_file;

        return $this;
    }