curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: Using multi-socket facility with epoll

From: Eran Ben Horin via curl-library <curl-library_at_cool.haxx.se>
Date: Mon, 15 Oct 2018 16:22:28 +0300

Hi,

The infos are a print of the CURLINFO_TEXT (it seems to just close the connection after the handshake):

== Info: Trying 216.58.204.36...
 Trying 216.58.204.36...

== Info: TCP_NODELAY set
TCP_NODELAY set

== Info: Connected to www.google.com <http://www.google.com/> (216.58.204.36) port 443 (#0)
Connected to www.google.com <http://www.google.com/> (216.58.204.36) port 443 (#0)

== Info: ALPN, offering http/1.1
ALPN, offering http/1.1

== Info: successfully set certificate verify locations:
successfully set certificate verify locations:

== Info: CAfile: /etc/ssl/certs/ca-certificates.crt
 CApath: none
 CAfile: /etc/ssl/certs/ca-certificates.crt
 CApath: none

=> Send SSL data

== Info: TLSv1.2 (OUT), TLS handshake, Client hello (1):
TLSv1.2 (OUT), TLS handshake, Client hello (1):

=> Send SSL data

<= Recv SSL data

== Info: TLSv1.2 (IN), TLS handshake, Server hello (2):
TLSv1.2 (IN), TLS handshake, Server hello (2):

<= Recv SSL data

<= Recv SSL data
8�
== Info: TLSv1.2 (IN), TLS handshake, Certificate (11):
TLSv1.2 (IN), TLS handshake, Certificate (11):

<= Recv SSL data

<= Recv SSL data

== Info: TLSv1.2 (IN), TLS handshake, Server key exchange (12):
TLSv1.2 (IN), TLS handshake, Server key exchange (12):

<= Recv SSL data

<= Recv SSL data

== Info: TLSv1.2 (IN), TLS handshake, Server finished (14):
TLSv1.2 (IN), TLS handshake, Server finished (14):

<= Recv SSL data

=> Send SSL data

== Info: TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
TLSv1.2 (OUT), TLS handshake, Client key exchange (16):

=> Send SSL data

=> Send SSL data

== Info: TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):

=> Send SSL data

=> Send SSL data

== Info: TLSv1.2 (OUT), TLS handshake, Finished (20):
TLSv1.2 (OUT), TLS handshake, Finished (20):

=> Send SSL data

== Info: Closing connection 0
Closing connection 0

> On 15 Oct 2018, at 16:20, Aleksandar Lazic <al-curllibrary_at_none.at> wrote:
>
> Am 14.10.2018 um 19:16 schrieb Eran Ben Horin via curl-library:
>> Hi,
>>
>> Thanks so much for your answer.
>> I tried it but it didn’t help …
>> 1. Is there any way of getting the issue out of libcurl? Im using: DEBUGFUNCTION + VERBOSE, Im checking all return codes. There isn’t any error!? :)
>
> What's the Debug and Verbose output?
>
> You can try to run the curl tool `curl -v ...`, just to see if the request works
> as expected and then create the source code with `curl --libcurl mycode.c ... `
>
> Hth
> Aleks
>
>> 2. Is there anything else I might be missing?
>>
>> Thank you very much,
>> Eran
>>
>>> On 14 Oct 2018, at 19:25, Sean MacLennan <seanm_at_seanm.ca> wrote:
>>>
>>> On Sun, 14 Oct 2018 18:56:59 +0300
>>> Eran Ben Horin via curl-library <curl-library_at_cool.haxx.se> wrote:
>>>
>>>> Hi,
>>>>
>>>> Thanks for you reply!!
>>>>
>>>> After further debugging, it seems that an ssl handshake takes place,
>>>> and the operation terminates right after it. I changed the protocol
>>>> type to HTTP, and things worked!!!
>>>>
>>>> Question:
>>>> 1. Does this example work for https as well?
>>>> 2. Do I need to do something additional, in order to “wake up” any
>>>> activity after the handshake finished.
>>>
>>> I bet the server is using a self-signed cert and curl is rejecting it.
>>>
>>> Try adding the following two lines:
>>>
>>> curl_easy_setopt(conn->easy, CURLOPT_SSL_VERIFYPEER, 0L);
>>> curl_easy_setopt(conn->easy, CURLOPT_SSL_VERIFYHOST, 0L);
>>>
>>> Cheers,
>>> Sean
>>
>>
>> -------------------------------------------------------------------
>> Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
>> Etiquette: https://curl.haxx.se/mail/etiquette.html
>>
>

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2018-10-15