"server closed abruptly (missing closed notify)" with WinSSL but not OpenSSL
Date: Fri, 14 Jun 2019 19:51:22 -0400
I'm using libcurl 7.65.1/WinSSL to send a GET request to an Apache
server endpoint to download some JSON. On one particular server (it is
running Apache 2.4.6 on Red Hat Enterprise) I'm getting
CURLE_RECV_ERROR. Running with the debug callback I see messages from
schannel that the server has closed the connection abruptly (see below).
The same request works fine when using curl built with OpenSSL. Even
with WinSSL this works with other Apache servers. Other GET endpoints on
the server are working correctly although those have smaller responses.
Looking at the debug info I can see that the full response is downloaded
and decrypted before I get the error. Any ideas on what could be the
cause? Any Apache configuration or libcurl changes I could try to remedy
this?
Thanks.
TCP_NODELAY set
Connected to XXXXXXXXXXXXXXXXXXXXXXX.com (xxxxxxx) port 443 (#6)
schannel: SSL/TLS connection with XXXXXXXXXXXXXXXXXXXXXXX.com port 443
(step 1/3)
schannel: re-using existing credential handle
schannel: incremented credential handle refcount = 2
schannel: sending initial handshake data: sending 386 bytes...
schannel: sent initial handshake data: sent 386 bytes
schannel: SSL/TLS connection with XXXXXXXXXXXXXXXXXXXXXXX.com port 443
(step 2/3)
schannel: failed to receive handshake, need more data
schannel: SSL/TLS connection with XXXXXXXXXXXXXXXXXXXXXXX.com port 443
(step 2/3)
schannel: encrypted data buffer: offset 105 length 4096
schannel: sending next handshake data: sending 51 bytes...
schannel: SSL/TLS handshake complete
schannel: SSL/TLS connection with XXXXXXXXXXXXXXXXXXXXXXX.com port 443
(step 3/3)
GET /api/dictionaries/XXXXXXXXXXXXXXDICT/cases HTTP/1.1
Host: XXXXXXXXXXXXXXXXXXXXXXX.com
Accept-Encoding: deflate, gzip
Authorization: Bearer 353b97e66fa35567dc1781df7a80350865845cc5
Content-Type: application/json; charset=utf-8
Accept: application/json
User-Agent: CSPro sync client/7.3.0 (beta)
Cache-Control: no-cache, no-store, must-revalidate
x-csw-device: 0a002700000b
x-csw-case-range-count: 100
schannel: client wants to read 16384 bytes
schannel: encdata_buffer resized 17408
schannel: encrypted data buffer: offset 0 length 17408
schannel: encrypted data got 1436
schannel: encrypted data buffer: offset 1436 length 17408
schannel: decrypted data length: 345
schannel: decrypted data added: 345
schannel: decrypted data cached: offset 345 length 16384
schannel: encrypted data length: 1062
schannel: encrypted data cached: offset 1062 length 17408
schannel: failed to decrypt data, need more data
schannel: schannel_recv cleanup
schannel: decrypted data returned 345
schannel: decrypted data buffer: offset 0 length 16384
HTTP 1.0, assume close after body
HTTP/1.0 206 Partial Content
Date: Fri, 14 Jun 2019 23:06:45 GMT
Server: Apache
Strict-Transport-Security: max-age=31536000; includeSubDomains
Cache-Control: private, must-revalidate
x-csw-case-range-count: 100/230
ETag: 732
x-csw-chunk-max-revision: 732
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: application/json
schannel: client wants to read 16384 bytes
schannel: encrypted data buffer: offset 1062 length 17408
schannel: encrypted data got 1436
schannel: encrypted data buffer: offset 2498 length 17408
schannel: failed to decrypt data, need more data
schannel: schannel_recv cleanup
schannel: client wants to read 16384 bytes
schannel: encrypted data buffer: offset 2498 length 17408
schannel: encrypted data got 4308
schannel: encrypted data buffer: offset 6806 length 17408
schannel: failed to decrypt data, need more data
schannel: schannel_recv cleanup
schannel: client wants to read 16384 bytes
schannel: encrypted data buffer: offset 6806 length 17408
schannel: encrypted data got 4308
schannel: encrypted data buffer: offset 11114 length 17408
schannel: failed to decrypt data, need more data
schannel: schannel_recv cleanup
schannel: client wants to read 16384 bytes
schannel: encrypted data buffer: offset 11114 length 17408
schannel: encrypted data got 2872
schannel: encrypted data buffer: offset 13986 length 17408
schannel: failed to decrypt data, need more data
schannel: schannel_recv cleanup
schannel: client wants to read 16384 bytes
schannel: encrypted data buffer: offset 13986 length 17408
schannel: encrypted data got 1436
schannel: encrypted data buffer: offset 15422 length 17408
schannel: failed to decrypt data, need more data
schannel: schannel_recv cleanup
schannel: client wants to read 16384 bytes
schannel: encrypted data buffer: offset 15422 length 17408
schannel: encrypted data got 1986
schannel: encrypted data buffer: offset 17408 length 17408
schannel: decrypted data length: 16384
schannel: decrypted data added: 16384
schannel: decrypted data cached: offset 16384 length 16384
schannel: encrypted data length: 995
schannel: encrypted data cached: offset 995 length 17408
schannel: encrypted data buffer: offset 995 length 17408
schannel: decrypted data buffer: offset 16384 length 16384
schannel: schannel_recv cleanup
schannel: decrypted data returned 16384
schannel: decrypted data buffer: offset 0 length 16384
schannel: encrypted data buffer: offset 995 length 17408
schannel: encrypted data got 13810
schannel: encrypted data buffer: offset 14805 length 17408
schannel: failed to decrypt data, need more data
schannel: schannel_recv cleanup
schannel: client wants to read 16384 bytes
schannel: encrypted data buffer: offset 14805 length 17408
schannel: encrypted data got 1436
schannel: encrypted data buffer: offset 16241 length 17408
schannel: failed to decrypt data, need more data
schannel: schannel_recv cleanup
schannel: client wants to read 16384 bytes
schannel: encrypted data buffer: offset 16241 length 17408
schannel: encrypted data got 1167
schannel: encrypted data buffer: offset 17408 length 17408
schannel: decrypted data length: 16384
schannel: decrypted data added: 16384
schannel: decrypted data cached: offset 16384 length 16384
schannel: encrypted data length: 995
schannel: encrypted data cached: offset 995 length 17408
schannel: encrypted data buffer: offset 995 length 17408
schannel: decrypted data buffer: offset 16384 length 16384
schannel: schannel_recv cleanup
schannel: decrypted data returned 16384
schannel: decrypted data buffer: offset 0 length 16384
schannel: encrypted data buffer: offset 995 length 17408
schannel: encrypted data got 8885
schannel: encrypted data buffer: offset 9880 length 17408
schannel: failed to decrypt data, need more data
schannel: schannel_recv cleanup
schannel: client wants to read 16384 bytes
schannel: encrypted data buffer: offset 9880 length 17408
schannel: encrypted data got 1436
schannel: encrypted data buffer: offset 11316 length 17408
schannel: failed to decrypt data, need more data
schannel: schannel_recv cleanup
schannel: client wants to read 16384 bytes
schannel: encrypted data buffer: offset 11316 length 17408
schannel: encrypted data got 1436
schannel: encrypted data buffer: offset 12752 length 17408
schannel: failed to decrypt data, need more data
schannel: schannel_recv cleanup
schannel: client wants to read 16384 bytes
schannel: encrypted data buffer: offset 12752 length 17408
schannel: encrypted data got 2872
schannel: encrypted data buffer: offset 15624 length 17408
schannel: failed to decrypt data, need more data
schannel: schannel_recv cleanup
schannel: client wants to read 16384 bytes
schannel: encrypted data buffer: offset 15624 length 17408
schannel: encrypted data got 1436
schannel: encrypted data buffer: offset 17060 length 17408
schannel: decrypted data length: 16384
schannel: decrypted data added: 16384
schannel: decrypted data cached: offset 16384 length 16384
schannel: encrypted data length: 647
schannel: encrypted data cached: offset 647 length 17408
schannel: encrypted data buffer: offset 647 length 17408
schannel: decrypted data buffer: offset 16384 length 16384
schannel: schannel_recv cleanup
schannel: decrypted data returned 16384
schannel: decrypted data buffer: offset 0 length 16384
schannel: encrypted data buffer: offset 647 length 17408
schannel: encrypted data got 1436
schannel: encrypted data buffer: offset 2083 length 17408
schannel: failed to decrypt data, need more data
schannel: schannel_recv cleanup
schannel: client wants to read 16384 bytes
schannel: encrypted data buffer: offset 2083 length 17408
schannel: encrypted data got 1436
schannel: encrypted data buffer: offset 3519 length 17408
schannel: failed to decrypt data, need more data
schannel: schannel_recv cleanup
schannel: client wants to read 16384 bytes
schannel: encrypted data buffer: offset 3519 length 17408
schannel: encrypted data got 3679
schannel: encrypted data buffer: offset 7198 length 17408
schannel: decrypted data length: 7139
schannel: decrypted data added: 7139
schannel: decrypted data cached: offset 7139 length 16384
schannel: encrypted data length: 30
schannel: encrypted data cached: offset 30 length 17408
schannel: decrypted data length: 1
schannel: decrypted data added: 1
schannel: decrypted data cached: offset 7140 length 16384
schannel: encrypted data buffer: offset 0 length 17408
schannel: decrypted data buffer: offset 7140 length 16384
schannel: schannel_recv cleanup
schannel: decrypted data returned 7140
schannel: decrypted data buffer: offset 0 length 16384
schannel: encrypted data buffer: offset 0 length 17408
schannel: server closed the connection
schannel: encrypted data buffer: offset 0 length 17408
schannel: encrypted data buffer: offset 0 length 17408
schannel: decrypted data buffer: offset 0 length 16384
schannel: schannel_recv cleanup
schannel: server closed abruptly (missing close_notify)
Closing connection 6
schannel: shutting down SSL/TLS connection with
XXXXXXXXXXXXXXXXXXXXXXX.com port 443
schannel: clear security context handle
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2019-06-15