Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to connect to server when query data from etherscan with client example in SGX_Linux. #239

Open
binwang-neu opened this issue Jan 6, 2021 · 1 comment
Assignees

Comments

@binwang-neu
Copy link

binwang-neu commented Jan 6, 2021

Hello, I'm trying to query data from server using the client example in SGX_Linux. But occurs a problem: Failed to connect to server.

I modified the client-tls.c file in three places:

  1. #define SERV_PORT 80
  2. char sendBuffer[] = "GET /api?module=account&action=balance&address=0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a&tag=latest&apikey=YourApiKeyToken";
  3. if (net_pton(AF_INET, "23.111.175.138", &servAddr.sin_addr))

And the error code is -326
VERSION_ERROR = -326, /* record layer version error */

Is there some setting somewhere I'm missing?

@JacobBarthelmeh
Copy link
Contributor

JacobBarthelmeh commented Jan 7, 2021

Hi @B-doublemint, the VERSION_ERROR is commonly related to either a mismatch of the TLS version itrying to be negotiated or some form of pre TLS info sent such as a StartTLS. The SGX example client is setting the TLS version to 1.2 by default with "enc_wolfTLSv1_2_client_method(id, &method);".

Does a GET command work with the non SGX bundled example client in wolfSSL?

cd wolfssl
./configure && make
./examples/client/client -p 80 -h 23.111.175.138 -v 3 -g

Regards,
Jacob

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants