15#include <zypp-core/base/Gettext.h>
16#include <zypp-core/base/String.h>
17#include <zypp-media/MediaException>
29 , _auth_type(CURLAUTH_NONE)
35 , _auth_type(CURLAUTH_NONE)
57 curl_version_info_data *curl_info = curl_version_info(CURLVERSION_NOW);
59 std::vector<std::string> list;
60 std::vector<std::string>::const_iterator it;
61 long auth_type = CURLAUTH_NONE;
65 for(it = list.begin(); it != list.end(); ++it)
69 auth_type |= CURLAUTH_BASIC;
74 auth_type |= CURLAUTH_DIGEST;
77 if((curl_info && (curl_info->features & CURL_VERSION_NTLM)) &&
80 auth_type |= CURLAUTH_NTLM;
83 if((curl_info && (curl_info->features & CURL_VERSION_SPNEGO)) &&
84 (*it ==
"spnego" || *it ==
"negotiate"))
87 auth_type |= CURLAUTH_GSSNEGOTIATE;
90 if((curl_info && (curl_info->features & CURL_VERSION_GSSNEGOTIATE)) &&
91 (*it ==
"gssnego" || *it ==
"negotiate"))
93 auth_type |= CURLAUTH_GSSNEGOTIATE;
106 std::list<std::string> auth_list;
108 if(auth_type & CURLAUTH_GSSNEGOTIATE)
109 auth_list.push_back(
"negotiate");
111 if(auth_type & CURLAUTH_NTLM)
112 auth_list.push_back(
"ntlm");
114 if(auth_type & CURLAUTH_DIGEST)
115 auth_list.push_back(
"digest");
117 if(auth_type & CURLAUTH_BASIC)
118 auth_list.push_back(
"basic");
String related utilities and Regular expression matching.
std::string join(TIterator begin, TIterator end, const C_Str &sep_r=" ")
Join strings using separator sep_r (defaults to BLANK).
unsigned split(const C_Str &line_r, TOutputIterator result_r, const C_Str &sepchars_r=" \t", const Trim trim_r=NO_TRIM)
Split line_r into words.
#define ZYPP_THROW(EXCPT)
Drops a logline and throws the Exception.