Hello
I need to consume a web service query, using CURL. The webservice
is https.
endpointUrl:=
"https://115efactura.info/ws/ws_efacturainfo_consultas.php"
cc1 := ""
cSoapAction:= 'SOAPAction: "'+endpointURL+'/'+cMetodo+'"'
aHeader := {}
AADD(aHeader,"Content-Type: text/xml;charset=UTF-8" )
AADD(aHeader, cSoapAction )
curlHandle := curl_easy_init()
if !empty(curlHandle)
/* Specify the Header data */
curl_easy_setopt(curlHandle, HB_CURLOPT_HTTPHEADER,aHeader)
/* para usar https, 1era forma*/
//curl_easy_setopt(curlHandle, HB_CURLOPT_SSL_VERIFYPEER,
.f.) ----> WORKS
/* para usar https, 2da forma, obteniendo el certificado*/
---> NO WORKS
curl_easy_setopt(curlHandle, HB_CURLOPT_SSL_VERIFYPEER, .t.)
curl_easy_setopt(curlHandle, HB_CURLOPT_SSL_VERIFYHOST, 0)
curl_easy_setopt(curlHandle, HB_CURLOPT_CAINFO,
GetCurrentFolder()+'\thawtePrimaryRootCA.crt')
/* Set the endpoint to send the POST to */
curl_easy_setopt(curlHandle, HB_CURLOPT_URL, endpointUrl)
/* Setup response data */
curl_easy_setopt( curlHandle, HB_CURLOPT_DOWNLOAD )
curl_easy_setopt( curlHandle, HB_CURLOPT_DL_BUFF_SETUP )
/* Specify the POST data */
curl_easy_setopt(curlHandle, HB_CURLOPT_POST, 1)
curl_easy_setopt(curlHandle, HB_CURLOPT_POSTFIELDS, cxml)
/* Do everything */
curlErr := curl_easy_perform(curlHandle)
...................... ETC
Od: "Paola Bruccoleri" <pbruc...@adinet.com.uy>
Do: "Lista Harbour-users" <harbou...@googlegroups.com>;
Wysłane: 0:07 Wtorek 2016-05-03
Temat: [harbour-users] curl with https
Have you CURL with SSL or not?
Pleas read README.md and from <http://curl.haxx.se/>
Hello
I need to consume a web service query, using CURL. The webservice is https.
endpointUrl:= "https://115efactura.info/ws/ws_efacturainfo_consultas.php"
I have the certificate with this tutorial: (the file thawtePrimaryRootCA.crt)
http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/
with the qick fix, works ok but with the proper fix, NO.
can you help me to do well?
very thanks!
Have you CURL with SSL or not?
Please read README.md and from <http://curl.haxx.se/> download CURL with SSL for your operating system.
Regards,
Marek Horodyski
Od: "Paola Bruccoleri" <pbruc...@adinet.com.uy>
Do: "Lista Harbour-users" <harbou...@googlegroups.com>;
Wysłane: 0:07 Wtorek 2016-05-03
Temat: [harbour-users] curl with https
Have you CURL with SSL or not?
Pleas read README.md and from <http://curl.haxx.se/>
*-----------------
It does not work like that. Go to https://curl.haxx.se/download.html
Regards,
Marek Horodyski
Have you CURL with SSL or not?
Pleas read README.md and from <http://curl.haxx.se/>
Hello Marek
I don't know :)
I installed curl and openssl and compile harbour with this.
*-----------------It does not work like that. Go to https://curl.haxx.se/download.html
Od: "Paola Bruccoleri" <pbruc...@adinet.com.uy>
Do: harbou...@googlegroups.com;
Wysłane: 16:12 Wtorek 2016-05-03
Temat: Re: [harbour-users] curl with https
Hi,
can you write, to test, all example from first mail. Just in case with problems we will ask Victor of help. Viktor wrote that curl from his fork (harbour 3.4) is worked on https. On linux ssl is element of OS, on Windows we must they think about.
Regards,
Marek Horodyski