Skip to content

wolfssl renegotiation support #3270

@hihigupt

Description

@hihigupt

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:

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

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.

github_wireshark.zip

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions