curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: response reading failed

From: Christian Schmitz via curl-library <curl-library_at_cool.haxx.se>
Date: Wed, 28 Aug 2019 22:10:38 +0200

>
> If you can reproduce, you can of course break-point or printf-debug those underlying functions to get more in-depth details about the particular failure. If your curl uses OpenSSL, lib/vtsl/openssl.c:ossl_recv() will be interesting!

So with SSL, we get:

A005 OK Logged in
A006 LIST "" "*"
TLSv1.2 (IN), TLS alert, close notify (256):
response reading failed

And in printf:

Curl_pp_readresp
ossl_recv
buffsize is 16384
SSL_read returned 0
SSL_get_error returned 6
SSL_ERROR_ZERO_RETURN
result from Curl_read is 0
gotbytes: 0
result is set to CURLE_RECV_ERROR

So any idea why a IMAP client would close the connection?

Full log:

  Trying xxx...
TCP_NODELAY set
Connected to xxx (xxx) port 143 (#0)
* OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ STARTTLS AUTH=PLAIN AUTH=LOGIN AUTH=DIGEST-MD5 AUTH=CRAM-MD5] Dovecot ready.
A001 CAPABILITY
* CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ STARTTLS AUTH=PLAIN AUTH=LOGIN AUTH=DIGEST-MD5 AUTH=CRAM-MD5
A001 OK Pre-login capabilities listed, post-login capabilities have more.
A002 STARTTLS
A002 OK Begin TLS negotiation now
TLSv1.3 (OUT), TLS handshake, Client hello (1):
TLSv1.3 (IN), TLS handshake, Server hello (2):
TLSv1.2 (IN), TLS handshake, Certificate (11):
TLSv1.2 (IN), TLS handshake, Server key exchange (12):
TLSv1.2 (IN), TLS handshake, Server finished (14):
TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
TLSv1.2 (OUT), TLS handshake, Finished (20):
TLSv1.2 (IN), TLS handshake, Finished (20):
SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
Server certificate:
 subject: xxx
 start date: xxx
 expire date: xxx
 issuer: C=US; O=GeoTrust Inc.; CN=GeoTrust SHA256 SSL CA
 SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
A003 CAPABILITY
* CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ AUTH=PLAIN AUTH=LOGIN AUTH=DIGEST-MD5 AUTH=CRAM-MD5
A003 OK Pre-login capabilities listed, post-login capabilities have more.
A004 AUTHENTICATE DIGEST-MD5
+ xxx=
*
A004 BAD Authentication aborted by client.
A005 AUTHENTICATE CRAM-MD5
+ xx==
xxx=
* CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE SNIPPET=FUZZY LITERAL+ NOTIFY METADATA SPECIAL-USE QUOTA ACL RIGHTS=texk
A005 OK Logged in
A006 LIST "" "*"
TLSv1.2 (IN), TLS alert, close notify (256):
response reading failed
A007 LOGOUT
response reading failed
Closing connection 0
TLSv1.2 (OUT), TLS alert, close notify (256):

Sincerely
Christian

-- 
Read our blog about news on our plugins:
http://www.mbsplugins.de/
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2019-08-28