-
Notifications
You must be signed in to change notification settings - Fork 923
Description
Hi,
I am using curl with wolfssl to connect to https endpoint, but connection to the server is dropped via client. This is because server sends a renegotiation request and client does not know how to handle (as curl did not add support for renegotiation, please look at the issue I filed on curl curl/curl#5839).
To address runtime support, I added code to enable renegotiation https://github.com/hihigupt/curl/blob/52e7dcf7ac8fb88635cb9a2b7d6d60db0bb64c06/lib/vtls/wolfssl.c#L502.
But I am still seeing the connection is closed via client, and if I enable logs of wolf ssl I am seeing following log before alert sent to server:
- STATE: PROTOCONNECT => DO handle 0x55c92aa0ae38; line 2028 (connection add option for bidirectional shutdown #1)
wolfSSL Entering SSL_write()
growing output buffer
wolfSSL Entering BuildMessage
wolfSSL Leaving BuildMessage, return 0
Shrinking output buffer
wolfSSL Leaving SSL_write(), return 221
POST /devices/test88/messages/events?api-version=2016-11-14 HTTP/1.1
Host: kartos.azure-devices.net
User-Agent: curl/7.73.0-DEV
Accept: /
Content-Type:application/json
Content-Length: 24
- upload completely sent off: 24 out of 24 bytes
- STATE: DO => DO_DONE handle 0x55c92aa0ae38; line 2083 (connection add option for bidirectional shutdown #1)
- STATE: DO_DONE => PERFORM handle 0x55c92aa0ae38; line 2204 (connection add option for bidirectional shutdown #1)
wolfSSL Entering wolfSSL_read()
wolfSSL Entering wolfSSL_read_internal()
wolfSSL Entering ReceiveData()
growing input buffer
received record layer msg
wolfSSL Entering DoHandShakeMsg()
wolfSSL Entering DoHandShakeMsgType
processing hello request
wolfSSL Entering DoHelloRequest
wolfSSL Leaving DoHelloRequest, return 0
Shrinking input buffer
wolfSSL Leaving DoHandShakeMsgType(), return 0
Need to start scr, server requested
Can't renegotiate until previous handshake complete
wolfSSL Leaving wolfSSL_read_internal(), return -388
wolfSSL Entering SSL_get_error
wolfSSL Leaving SSL_get_error, return 0
wolfSSL Entering ERR_error_string
Is there anything else missing from my side or renegotiation feature is broken? I am attaching wireshark trace and key to this issue.