[GB.NET.CURL]
* BUG: The VerifyPeer and VerifyHost properties are really taken into account now. But I'm not sure that everything is fixed. git-svn-id: svn://localhost/gambas/trunk@6330 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
ab80d1ab67
commit
c87b7c4bb5
4 changed files with 9 additions and 1 deletions
gb.net.curl/src
|
@ -252,6 +252,11 @@ void CURL_init_stream(void *_object)
|
|||
GB.Stream.SetAvailableNow(&THIS->stream, TRUE);
|
||||
}
|
||||
|
||||
void CURL_init_options(void *_object)
|
||||
{
|
||||
curl_easy_setopt(THIS_CURL, CURLOPT_SSL_VERIFYPEER, THIS->ssl_verify_peer ? 1 : 0);
|
||||
curl_easy_setopt(THIS_CURL, CURLOPT_SSL_VERIFYHOST , THIS->ssl_verify_host ? 2 : 0);
|
||||
}
|
||||
|
||||
#define CHECK_PROGRESS_VAL(_var) if (THIS->_var != (int64_t)_var) { THIS->_var = (int64_t)_var; raise = TRUE; }
|
||||
|
||||
|
|
|
@ -106,6 +106,7 @@ void CURL_stop(void *_object);
|
|||
void CURL_manage_error(void *_object, int error);
|
||||
|
||||
void CURL_init_stream(void *_object);
|
||||
void CURL_init_options(void *_object);
|
||||
|
||||
bool CURL_check_active(void *_object);
|
||||
|
||||
|
|
|
@ -128,6 +128,7 @@ static void ftp_initialize_curl_handle(void *_object)
|
|||
ftp_reset(THIS_FTP);
|
||||
THIS_STATUS = NET_CONNECTING;
|
||||
|
||||
CURL_init_options(THIS);
|
||||
CURL_init_stream(THIS);
|
||||
}
|
||||
|
||||
|
|
|
@ -226,6 +226,7 @@ static void http_initialize_curl_handle(void *_object, GB_ARRAY custom_headers)
|
|||
GB.Ref(custom_headers);
|
||||
}
|
||||
|
||||
CURL_init_options(THIS);
|
||||
CURL_init_stream(THIS);
|
||||
}
|
||||
|
||||
|
@ -393,7 +394,7 @@ static void http_send(void *_object, int type, char *sContent, char *sData, int
|
|||
}
|
||||
|
||||
CURL_set_progress(THIS_CURL, TRUE);
|
||||
|
||||
|
||||
if (THIS->async)
|
||||
{
|
||||
CURL_start_post(THIS);
|
||||
|
|
Loading…
Reference in a new issue