Topic: wolfSSL_connect Fail

FTP SSL downloads files from the Internet. The first time you control the connection, you can log in to the server, enter pasV mode, and resolve the IP address and port number. The second time you connect to the server, wolfSSL fails to connect, and the Client sends Client Hello and sends an Alert. Connect state: CLIENT_HELLO_SENT, and then shutdown is called for two-way shutdown. Attempts to re-read server information fail. The client never connected to the server.

Share

Re: wolfSSL_connect Fail

Hello zyhaha,

Thanks for joining the wolfSSL Forums. It sounds like the server is expecting the client to use a session ticket to renegotiate the connection. Could you please share a pcap of the first and second connections?

Kind regards,
Eric @ wolfSSL Support

Re: wolfSSL_connect Fail

Probably not, because the server does not send the ticket to the client. During the second handshake, the Client sends the following Hello packets :Session ID Length: 0; Then the client sends Alert (Level: Warning, Description: Close Notify) and [FIN,ACK]

Share

Re: wolfSSL_connect Fail

Hello Eric,
  Thank you for your reply and help. The following is the PCAP file I provided.

Best wishes

Post's attachments

06-30.11-33-07-20xianshiF_iface 56_IP.pcap 27.36 kb, 4 downloads since 2022-07-07 

You don't have the permssions to download the attachments of this post.

Share

Re: wolfSSL_connect Fail

The server is expecting the data channel to resume the session. You'll need to save the session from the first connection, and then set the session before doing the second connection.

Here is an example:
https://github.com/wolfSSL/wolfssl-exam … s-resume.c