Open Storm
|
Implements functions for configuring SSL/TLS. More...
#include <project.h>
Go to the source code of this file.
Macros | |
#define | CLIENT_CERT "-----\032\0" |
#define | PRIVATE_KEY "-----\032\0" |
#define | SERVER_CERT |
Functions | |
uint8 | modem_ssl_toggle (int enable_ssl) |
Toggle SSL Socket. More... | |
uint8 | modem_ssl_sec_data (uint8 ssid, uint8 action, uint8 datatype, char *cert, char *output_str) |
Stores the security data (certificate(s) and/or private key) into the module’s NVM. More... | |
uint8 | modem_ssl_sec_config (uint8 ssid, uint8 cipher_suite, uint8 auth_mode, uint8 cert_format) |
configure the communication channel according to the user’s security architecture. More... | |
uint8 | modem_ssl_config (uint8 ssid, uint8 cid, int packet_size, int max_to, int def_to, int tx_to, uint8 ssl_ring_mode) |
Before opening the SSL socket, several parameters can be configured via this command: More... | |
uint8 | ssl_init (uint8 edit_ssl_sec_config, uint8 edit_ssl_config) |
Initialize SSL features. More... | |
Implements functions for configuring SSL/TLS.
#define SERVER_CERT |
uint8 modem_ssl_config | ( | uint8 | ssid, |
uint8 | cid, | ||
int | packet_size, | ||
int | max_to, | ||
int | def_to, | ||
int | tx_to, | ||
uint8 | ssl_ring_mode | ||
) |
Before opening the SSL socket, several parameters can be configured via this command:
ssid | Must be set to 1. It is the only Secure Socket ID available. |
cid | The PDP Context Identifier, it's value must be set to 1. |
packet_size | Is the size of the packet used by the SSL/TCP/IP stack for data sending in online mode. Small <pktSize> values introduce a higher communication overhead. |
max_to | Is the socket inactivity timeout. In online mode: if there’s no data exchange within this timeout period the connection is closed. Increment it if it is needed a longer idle time period. |
def_to | Timeout value used as default value by other SSL commands whenever their Timeout parameters are not set. |
tx_to | Is the time period after which data is sent even if <pktSize> is not reached (only in online mode). The parameter value must be tuned with user’s application requirements. Small <txTo> values introduce a higher communication overhead. |
ssl_ring_mode | Is the presentation mode of the SSLSRING unsolicited indication, which informs the user about new incoming data that can be read in command mode. It can be disabled using value 0. |
uint8 modem_ssl_sec_config | ( | uint8 | ssid, |
uint8 | cipher_suite, | ||
uint8 | auth_mode, | ||
uint8 | cert_format | ||
) |
configure the communication channel according to the user’s security architecture.
ssid | Must be set to 1. It is the only Secure Socket ID available |
cipher_suite | Setting the value 0 all the available cipher suites are proposed to the server. It is responsibility of the remote server to select one of them:
|
auth_mode | Is the authentication mode:
|
cert_format | Is an optional parameter. It selects the format of the certificate to be stored via #SSLSECDATA command.
|
uint8 modem_ssl_sec_data | ( | uint8 | ssid, |
uint8 | action, | ||
uint8 | datatype, | ||
char * | cert, | ||
char * | output_str | ||
) |
Stores the security data (certificate(s) and/or private key) into the module’s NVM.
ssid | Must be set to 1. It is the only Secure Socket ID available. |
action | The action to be performed:
|
datatype | identifies the certificate/key to be stored or read:
|
cert | The certificate to be written to the modem. |
output_str | The buffer to write the current state of the modem. ONLY USED WHEN ACTION IS READ MODE. |
uint8 modem_ssl_toggle | ( | int | enable_ssl | ) |
Toggle SSL Socket.
enable_ssl | enable flag:
|
uint8 ssl_init | ( | uint8 | edit_ssl_sec_config, |
uint8 | edit_ssl_config | ||
) |
Initialize SSL features.
edit_ssl_sec_config | Enable flag: edit SSL security settings (SSLSECCFG) if desired. |
edit_ssl_config | Enable flag: edit general SSL configuration (SSLCFG) if desired. |