Add secure socket layer options for modem ports #147
Closed
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.
Description
Cellular modem may support secure socket connection with modem specific APIs. This PR adds the secure socket layer options to enable secure socket connection with port layer APIs. Port has to implements the following functions with board specific AT commands:
For example, BG96 can define the following APIs in cellular_bg96_api.h for user to include and implement these APIs in cellular_bg96_api.c.
BG96 has to support
CELLULAR_SOCKET_OPTION_SSL_CONTEXT_ID
andCELLULAR_SOCKET_OPTION_SSL_USAGE
in the implementation ofCellular_SocketSetSockOpt
. For example,User of cellular interface can make use of port specific APIs to create a secure socket connection with the following example.
Test Steps
Checklist:
Related Issue
#146
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.