application/davcontroller.c

changeset 93
5ee236155955
parent 91
7ee944cf53de
child 95
e92c72705da4
equal deleted inserted replaced
92:43aee6c8c166 93:5ee236155955
172 DavSession *sn = dav_session_new(application_dav_context(), repo->url.value.ptr); 172 DavSession *sn = dav_session_new(application_dav_context(), repo->url.value.ptr);
173 if (user && password) { 173 if (user && password) {
174 dav_session_set_auth(sn, user, password); 174 dav_session_set_auth(sn, user, password);
175 } 175 }
176 free(password_free); 176 free(password_free);
177
178 sn->flags = dav_repository_get_flags(repo);
179 sn->key = dav_context_get_key(application_dav_context(), repo->default_key.value.ptr);
180 curl_easy_setopt(sn->handle, CURLOPT_SSLVERSION, repo->ssl_version);
181 if(repo->cert.value.ptr) {
182 curl_easy_setopt(sn->handle, CURLOPT_CAINFO, repo->cert.value.ptr);
183 }
184 if(!repo->verification.value) {
185 curl_easy_setopt(sn->handle, CURLOPT_SSL_VERIFYPEER, 0);
186 curl_easy_setopt(sn->handle, CURLOPT_SSL_VERIFYHOST, 0);
187 }
188
177 189
178 browser->sn = sn; 190 browser->sn = sn;
179 if (repo->name.value.length > 0) { 191 if (repo->name.value.length > 0) {
180 browser->repo_base = cx_strdup(cx_strn(repo->name.value.ptr, repo->name.value.length)).ptr; 192 browser->repo_base = cx_strdup(cx_strn(repo->name.value.ptr, repo->name.value.length)).ptr;
181 } else { 193 } else {

mercurial