-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(websocket): Expanded example to demonstrate the transfer over TLS
- Loading branch information
1 parent
891384c
commit 59b643f
Showing
8 changed files
with
127 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
components/esp_websocket_client/examples/target/main/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
idf_component_register(SRCS "websocket_example.c" | ||
INCLUDE_DIRS ".") | ||
INCLUDE_DIRS "." | ||
EMBED_TXTFILES "certs/cert.pem" | ||
"certs/key.pem") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
components/esp_websocket_client/examples/target/main/certs/cert.pem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIDazCCAlOgAwIBAgIUUJJvU5aje0roUMhf/isv1uOXrVYwDQYJKoZIhvcNAQEL | ||
BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM | ||
GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yNDAyMDYxMDE5NDNaFw0yNTAy | ||
MDUxMDE5NDNaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEw | ||
HwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggEiMA0GCSqGSIb3DQEB | ||
AQUAA4IBDwAwggEKAoIBAQDFQtDVC88EAv4r8uex14uf3KTxMugX8o5eMzTmN0l6 | ||
N3Ck+D/64r+9CiIDiaGQBbenGnBBXTH/w3Itiv6XX2lhUOgOusK6/JnTJx0sqN8q | ||
0R9NRTi/2XOIgdWaKZipkbS9jIw2tiqMgh/8dt9VLbfGpnzdqyYFW6MBJI39IFib | ||
diIta/SJYUTkEhBlewFk0WBB7w8gu/J1HQKUJ66w0tLsCxVGdqLeNlCRsWE2gzFZ | ||
CmRGm+SqVwiqXGjAWZmv+F7LCeo9XmTt8PUEuOyaE+Pdn3o8RDaa6dMHuifdMC60 | ||
UVlUGQf42RrzCSiq/SCz4/KXVDjoU4hJvw3mbQsErg+/AgMBAAGjUzBRMB0GA1Ud | ||
DgQWBBS3wFg8rTaidZ4Zis80C4EhjFbVtDAfBgNVHSMEGDAWgBS3wFg8rTaidZ4Z | ||
is80C4EhjFbVtDAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAw | ||
gvAXomB7hjbhRagEmcS0omTyT01vJCqAfUJif6yfC8XTS2iPphKlY37t+FCLwyJ3 | ||
3in+NzivJBdBZLAMGvo1l9C/IhSGinKYJKMVFZzXxL24+5IQ0k5OIT3Mujbp8m+N | ||
eVKKygAXX/onnc0JQppxcO98BdOIhq9xgWUakrtFvWzCHj/SOzrvB3maglHh7RHf | ||
T4XFLU6in6rfr4gl2ffAs054zvsyQTWb2KwcldCcTAsCZKbesimbAocMwyoOEWhw | ||
wA6UiUg2LkdVtoQ737WsvzW+Pu73tNGJeqXBTWPaq3rBrXN5hufwQPLkoQtFXKGb | ||
gXYUy2Vaf78N22BpM1Vm | ||
-----END CERTIFICATE----- |
28 changes: 28 additions & 0 deletions
28
components/esp_websocket_client/examples/target/main/certs/key.pem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
-----BEGIN PRIVATE KEY----- | ||
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDFQtDVC88EAv4r | ||
8uex14uf3KTxMugX8o5eMzTmN0l6N3Ck+D/64r+9CiIDiaGQBbenGnBBXTH/w3It | ||
iv6XX2lhUOgOusK6/JnTJx0sqN8q0R9NRTi/2XOIgdWaKZipkbS9jIw2tiqMgh/8 | ||
dt9VLbfGpnzdqyYFW6MBJI39IFibdiIta/SJYUTkEhBlewFk0WBB7w8gu/J1HQKU | ||
J66w0tLsCxVGdqLeNlCRsWE2gzFZCmRGm+SqVwiqXGjAWZmv+F7LCeo9XmTt8PUE | ||
uOyaE+Pdn3o8RDaa6dMHuifdMC60UVlUGQf42RrzCSiq/SCz4/KXVDjoU4hJvw3m | ||
bQsErg+/AgMBAAECggEAHICehyIZK/W4vyXud4JzEMrDZHycD5XDH3ZbruYPLmMj | ||
Whrqt7gax1hW+NbiqtpAopsN3Ev4hQG7FjyOs9Wb9u1HUpWGvJjyKxHsQ780281y | ||
reoSHJpxeKh18jwPbHT6via4PdGNjVbiA0sz0u1zr/bvdOIdcMnAYFJlV81cMD4c | ||
tBDIGpfYtqYcp4lcGhTqFrRYRCbSGpPRfqIozbQp6/5c/Eyh08tFa50bjNix/Nvk | ||
Hprfr7uV7s+w+wkyCyhCulrz14ol9E8Flc2sqq9OflzYXh1oSumdpzsjQNiVdhKV | ||
InsLWMpaRSaNHYQCbBc/rhxfkpORhWD240LHnP62mQKBgQD7Dql0mDoHtNB62PNn | ||
VfoF2yjxIfQzwZC7XfUXz0/Q3apJrP4EHjuTL4QVjJPV50wS71/evEsuGcv8kVZf | ||
1klcOPE38vPtVJPPE50Xf00Tm2azfawkU6u1yYd2bmP1Bac1YoZNd/o4+E2wPgDB | ||
JXFv7wn/i24iZ58Gi1ZrXGGU2QKBgQDJJQTBhEm9ZOx48VpsiLX2GfwzJknQGcCy | ||
CduAIqbFVUtl+UN3sANbnhjvNU2P7f7nJpK6NEz89HctpcFh0wZmrNCawfYSXu4f | ||
LKvl9tXd4RsdF7tTkhbU8blZxmSRatybioObikzXsV3NqaIz1uhisXroWzrL2BUS | ||
nAUYbNQKVwKBgQCzgoxPvfjgQb0/2ZhQrv0S6t2fbPO7fhAKqOfyml0rrxNvkq4e | ||
K6/VUghTkCy0qamPcHFQRbpLwE5GzXTBGeticaSoqKMZc3wseI2+m1t1RYxtktJf | ||
NyRz2yFs4Qm/zMb+OPBmu/7CdWi3N946PJebvYOcoQmiuAzRFRg5s9hiIQKBgQCw | ||
OEZaY9NWojyqGIjn3T3NRia1iS3Rqz4uvIQZVkJVT8ymoiKBkSrf8TpXF5PELPXM | ||
/PY/O+LXGjXvP/CUC5ToDy8S5ir3HUPw++n9pqrnoHdonYn4RVzLYprIFA+3dq+f | ||
dVKnyhpYPYO40ozQbc9Z57OOLZ7tR3nuu9Ga/H0oMQKBgQDKsiwfaQdiHZUZBN45 | ||
YuAfdbwbXi08f8mWLaZuQY6mSiNLaMmxQ6wfT1CC0NMvg/JCEnWu7YAmwen4rC4p | ||
dd6xr+6XBODfyVVGnFmflIdilzBqFmwVWhsRceXVCWrGWk+qusKrFGaDcPRdqx0w | ||
a5WeQBMriwoeq2Ajpyj2c6IPow== | ||
-----END PRIVATE KEY----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
components/esp_websocket_client/examples/target/sdkconfig.ci.encrypted
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
CONFIG_IDF_TARGET="esp32" | ||
CONFIG_IDF_TARGET_LINUX=n | ||
CONFIG_WEBSOCKET_URI_FROM_STDIN=y | ||
CONFIG_WEBSOCKET_URI_FROM_STRING=n | ||
CONFIG_EXAMPLE_CONNECT_ETHERNET=y | ||
CONFIG_EXAMPLE_CONNECT_WIFI=n | ||
CONFIG_EXAMPLE_USE_INTERNAL_ETHERNET=y | ||
CONFIG_EXAMPLE_ETH_PHY_IP101=y | ||
CONFIG_EXAMPLE_ETH_MDC_GPIO=23 | ||
CONFIG_EXAMPLE_ETH_MDIO_GPIO=18 | ||
CONFIG_EXAMPLE_ETH_PHY_RST_GPIO=5 | ||
CONFIG_EXAMPLE_ETH_PHY_ADDR=1 | ||
CONFIG_EXAMPLE_CONNECT_IPV6=y | ||
CONFIG_WS_OVER_TLS_SCHEME=y | ||
# CONFIG_ESP_TLS_INSECURE=y | ||
# CONFIG_ESP_TLS_SKIP_SERVER_CERT_VERIFY=y | ||
# CONFIG_ESP_TLS_USING_MBEDTLS=y | ||
# CONFIG_ESP_TLS_PSK_VERIFICATION=y |