-
Notifications
You must be signed in to change notification settings - Fork 8k
TLS communication for secure sockets #8814
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
Merged
nashif
merged 8 commits into
zephyrproject-rtos:master
from
rlubos:tls-socket-communication
Jul 13, 2018
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
8d4da7a
net: socket: Add switch to enable TLS socket option support
rlubos c81bc61
net: tls: Add TLS context allocation/deallocation
rlubos f3807f2
net: tls: Add mbedTLS entropy source
rlubos 7a55838
net: tls: Add mbedTLS logging
rlubos 55d8782
net: tls: Handle TLS handshake
rlubos 4a704bd
net: tls: Handle TLS socket send and recv
rlubos 1e04bd0
net: tls: Implement poll with support for mbedTLS pending data
rlubos 5e169ff
net: samples: Add TLS support to http_get and big_http_download samples
rlubos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,46 @@ | ||
# General config | ||
CONFIG_NEWLIB_LIBC=y | ||
|
||
# Networking config | ||
CONFIG_NETWORKING=y | ||
CONFIG_NET_IPV4=y | ||
CONFIG_NET_IPV6=y | ||
CONFIG_NET_TCP=y | ||
CONFIG_NET_SOCKETS=y | ||
CONFIG_NET_SOCKETS_POSIX_NAMES=y | ||
|
||
CONFIG_NET_PKT_TX_COUNT=10 | ||
|
||
CONFIG_DNS_RESOLVER=y | ||
CONFIG_DNS_SERVER_IP_ADDRESSES=y | ||
CONFIG_DNS_SERVER1="192.0.2.2" | ||
|
||
# Network driver config | ||
CONFIG_TEST_RANDOM_GENERATOR=y | ||
|
||
# Network address config | ||
CONFIG_NET_APP_SETTINGS=y | ||
CONFIG_NET_APP_NEED_IPV4=y | ||
CONFIG_NET_APP_MY_IPV4_ADDR="192.0.2.1" | ||
CONFIG_NET_APP_PEER_IPV4_ADDR="192.0.2.2" | ||
CONFIG_NET_APP_MY_IPV4_GW="192.0.2.2" | ||
# DHCP configuration. Until DHCP address is assigned, | ||
# static configuration above is used instead. | ||
CONFIG_NET_DHCPV4=y | ||
|
||
# Network debug config | ||
CONFIG_NET_LOG=y | ||
CONFIG_NET_LOG_GLOBAL=y | ||
CONFIG_SYS_LOG_NET_LEVEL=2 | ||
#CONFIG_NET_DEBUG_SOCKETS=y | ||
#CONFIG_NET_SHELL=y | ||
|
||
# TLS configuration | ||
CONFIG_MBEDTLS=y | ||
CONFIG_MBEDTLS_BUILTIN=y | ||
CONFIG_MBEDTLS_ENABLE_HEAP=y | ||
CONFIG_MBEDTLS_HEAP_SIZE=60000 | ||
CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=16384 | ||
|
||
CONFIG_MAIN_STACK_SIZE=4096 | ||
CONFIG_NET_SOCKETS_SOCKOPT_TLS=y |
This file contains hidden or 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 hidden or 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,40 @@ | ||
# General config | ||
CONFIG_NEWLIB_LIBC=y | ||
|
||
# Networking config | ||
CONFIG_NETWORKING=y | ||
CONFIG_NET_IPV4=y | ||
CONFIG_NET_IPV6=y | ||
CONFIG_NET_TCP=y | ||
CONFIG_NET_SOCKETS=y | ||
CONFIG_NET_SOCKETS_POSIX_NAMES=y | ||
|
||
CONFIG_DNS_RESOLVER=y | ||
CONFIG_DNS_SERVER_IP_ADDRESSES=y | ||
CONFIG_DNS_SERVER1="192.0.2.2" | ||
|
||
# Network driver config | ||
CONFIG_TEST_RANDOM_GENERATOR=y | ||
|
||
# Network address config | ||
CONFIG_NET_APP_SETTINGS=y | ||
CONFIG_NET_APP_NEED_IPV4=y | ||
CONFIG_NET_APP_MY_IPV4_ADDR="192.0.2.1" | ||
CONFIG_NET_APP_PEER_IPV4_ADDR="192.0.2.2" | ||
CONFIG_NET_APP_MY_IPV4_GW="192.0.2.2" | ||
|
||
# Network debug config | ||
CONFIG_NET_LOG=y | ||
CONFIG_NET_LOG_GLOBAL=y | ||
CONFIG_SYS_LOG_NET_LEVEL=2 | ||
#CONFIG_NET_DEBUG_SOCKETS=y | ||
|
||
# TLS configuration | ||
CONFIG_MBEDTLS=y | ||
CONFIG_MBEDTLS_BUILTIN=y | ||
CONFIG_MBEDTLS_ENABLE_HEAP=y | ||
CONFIG_MBEDTLS_HEAP_SIZE=30000 | ||
CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=4096 | ||
|
||
CONFIG_MAIN_STACK_SIZE=4096 | ||
CONFIG_NET_SOCKETS_SOCKOPT_TLS=y |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit is nice, clean and easy to review, I can only +1 it. But I think that commit message should emphasize that the purpose of this commit is to establish "switching infrastructure", but the actual implementation in this commit is null, just redirects to normal socket calls.