151 DavSession *sn = dav_session_new_auth( |
151 DavSession *sn = dav_session_new_auth( |
152 ctx, |
152 ctx, |
153 url, |
153 url, |
154 repo->user, |
154 repo->user, |
155 repo->password); |
155 repo->password); |
156 curl_easy_setopt(sn->handle, CURLOPT_SSLVERSION, repo->ssl_version); |
|
157 sn->flags = get_repository_flags(repo); |
156 sn->flags = get_repository_flags(repo); |
158 sn->key = dav_context_get_key(ctx, repo->default_key); |
157 sn->key = dav_context_get_key(ctx, repo->default_key); |
|
158 curl_easy_setopt(sn->handle, CURLOPT_HTTPAUTH, repo->authmethods); |
|
159 curl_easy_setopt(sn->handle, CURLOPT_SSLVERSION, repo->ssl_version); |
|
160 if(repo->cert) { |
|
161 curl_easy_setopt(sn->handle, CURLOPT_CAPATH, repo->cert); |
|
162 } |
|
163 if(!repo->verification) { |
|
164 curl_easy_setopt(sn->handle, CURLOPT_SSL_VERIFYPEER, 0); |
|
165 curl_easy_setopt(sn->handle, CURLOPT_SSL_VERIFYHOST, 0); |
|
166 } |
159 return sn; |
167 return sn; |
160 } |
168 } |
161 |
169 |
162 int cmd_pull(CmdArgs *a) { |
170 int cmd_pull(CmdArgs *a) { |
163 if(a->argc != 1) { |
171 if(a->argc != 1) { |