-
Notifications
You must be signed in to change notification settings - Fork 33
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
WiFiClient does not support https #8
Comments
Good feature suggestion. @pc0808f Do you have any suggestions on desired interface? e.g.
|
The SDK support HTTPS,
Is it possible to use it?
2017年5月2日 下午2:04,"Pablo Sun" <notifications@github.com>寫道:
… Good feature suggestion.
@pc0808f <https://github.com/pc0808f> Do you have any suggestions on
desired interface? e.g.
1.
Extending the WiFiClient class, or Create a new class WiFiSSLClient,
similar to the design of Arduino 101? Note that adding SSL/TLS support for
HTTPS require more flash size (for certificates) and RAM size. So probably
it might be better to separate into 2 classes.
2.
Should the library asks users to provide Root Certificate? It will
save some space if we ask user to provide the exact Root CA that they would
need to connect to the remote server. Otherwise we'll need to preload
several certificate for different websites.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKBZoqxmGukWFzxlYPzbnmu1-p2_hyxtks5r1sdOgaJpZM4NNuJO>
.
|
Yes, with some modifications to the Add-on package. The SDK dependency looks like this:
Currently, the Arduino Add-on only includes So I think we can rephrase this issue to: |
if it can support general SSL/TLS connection API (exposing mbedTLS library), it will be better. because, i may use the websockets. |
Hi @pc0808f Would you mind give the alpha version a try?
The expected result should be something like this: Attempting to connect to SSID: MediaTek_Labs
Connected to wifi
SSID: MediaTek_Labs
IP Address: 192.168.1.49
signal strength (RSSI):-61 dBm
Starting connection to server...
connected to server (GET)
HTTP/1.1 200 OK
Content-Length: 662
Access-Control-Allow-Origin: *
Connection: close
Content-Type: application/json
Date: Tue, 09 May 2017 10:15:26 GMT
Strict-Transport-Security: max-age=631138519; includeSubdomains; preload
{"given_cipher_suites":["TLS_RSA_WITH_AES_256_CBC_SHA256","TLS_RSA_WITH_AES_256_CBC_SHA","TLS_RSA_WITH_AES_128_CBC_SHA256","TLS_RSA_WITH_AES_128_CBC_SHA","TLS_RSA_WITH_3DES_EDE_CBC_SHA","TLS_PSK_WITH_AES_256_CBC_SHA384","TLS_PSK_WITH_AES_256_CBC_SHA","TLS_PSK_WITH_AES_128_CBC_SHA256","TLS_PSK_WITH_AES_128_CBC_SHA","TLS_PSK_WITH_3DES_EDE_CBC_SHA","TLS_EMPTY_RENEGOTIATION_INFO_SCSV"],"ephemeral_keys_supported":false,"session_ticket_supported":false,"tls_compression_supported":false,"unknown_cipher_suite_supported":false,"beast_vuln":false,"able_to_detect_n_minus_one_splitting":false,"insecure_cipher_suites":{},"tls_version":"TLS 1.2","rating":"Improvable"}
disconnecting from server. Please kindly comment if this suits your needs, and feel free to feedback bugs or request in this thread. thanks! |
i will try it , and get so feedback later~ |
The TLSClient maybe work, but i only can receive 32768 bytes data from client.read
I use a count to count read data. My usage is to download to FOTA bin, but it seem can not receive a big bin file(183,336bytes). BTW, the both the TLSClient and WIFIClient can not link to http(80) anymore?? the following result is print from example wifiwebclient Attempting to connect to SSID: sam Starting connection to server... disconnecting from server. |
I can run the
if (client.connect(server, 80)) {
Serial.println("connected to server (GET)");
// Make a HTTP request:
client.println("GET /linkit_7697_ascii.txt HTTP/1.0");
client.println("Host: download.labs.mediatek.com");
client.println("Accept: */*");
client.println("Connection: close");
client.println();
delay(500); // modify to a longer delay, e.g. 500ms.
} |
It is better if the delay set to 500. So, let we back to count number. both wificlient and TLSclient can not get whole files. you can try this
and the counting code
|
Thanks, I can reproduce the issue. Looks like there is an |
Update issue status:
We'll need to keep investigate into the |
Turns out the verification error is caused the insufficient heap size. The Arduino BSP consumes more heap memory then its LinkIt SDK projects (because of the wrapping C++ objects). In the mbedTLS library, the So, the stop at byte 32768 issue can be fixed by:
|
Hi @pc0808f,
Hope this helps :) |
We add a new `TLSClient` class as part of the LWiFi library, it * Wraps mbedTLS calls * Provide an example that connects to http://howsmyssl.com Some implementation details: * mbedTLS is already in the liblinkit.a * Switch the default mbedTLS config file to config-mtk-websocket.h which have a larger TLS content buffer. * Increase FreeRTOS heap size to 120KB because increasing the TLS content buffer results in larger heap memory usage. * Also fixes #12 by correct use `const char*` in ssid parameter in `WiFi` APIs.
Supported in v0.7.10. |
WiFiClient does not support https
The text was updated successfully, but these errors were encountered: