ssnprintf (wp->credentials, credentials_size, "%s:%s",
wp->user, (wp->pass == NULL) ? "" : wp->pass);
curl_easy_setopt (wp->curl, CURLOPT_USERPWD, wp->credentials);
-
+
if (wp->digest)
- {
curl_easy_setopt (wp->curl, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
- curl_easy_setopt (wp->curl, CURLOPT_USERNAME, wp->user);
- curl_easy_setopt (wp->curl, CURLOPT_PASSWORD, wp->pass);
- }
}
curl_easy_setopt (wp->curl, CURLOPT_SSL_VERIFYPEER, (long) wp->verify_peer);
ssnprintf (db->credentials, credentials_size, "%s:%s",
db->user, (db->pass == NULL) ? "" : db->pass);
curl_easy_setopt (db->curl, CURLOPT_USERPWD, db->credentials);
-
+
if (db->digest)
- {
curl_easy_setopt (db->curl, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
- curl_easy_setopt (db->curl, CURLOPT_USERNAME, db->user);
- curl_easy_setopt (db->curl, CURLOPT_PASSWORD, db->pass);
- }
}
curl_easy_setopt (db->curl, CURLOPT_SSL_VERIFYPEER, (long) db->verify_peer);
ssnprintf (db->credentials, credentials_size, "%s:%s",
db->user, (db->pass == NULL) ? "" : db->pass);
curl_easy_setopt (db->curl, CURLOPT_USERPWD, db->credentials);
-
+
if (db->digest)
- {
curl_easy_setopt (db->curl, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
- curl_easy_setopt (db->curl, CURLOPT_USERNAME, db->user);
- curl_easy_setopt (db->curl, CURLOPT_PASSWORD, db->pass);
- }
}
curl_easy_setopt (db->curl, CURLOPT_SSL_VERIFYPEER, db->verify_peer ? 1L : 0L);