TLS/DTLS configuration
The modem on an nRF9160 device is equipped with a full IPv4/IPv6 stack with TLS/DTLS support.
Supported cipher suites
See the nRF9160 modem TLS cipher suites summary page for a full list of TLS/DTLS cipher suites supported by the modem.
Each cipher suite is recognized by an official identification number, which is registered at IANA.
You can narrow down the set of cipher suites that is used for a specific TLS/DTLS connection with nrf_setsockopt()
.
For example, see the following code:
/* TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA */
nrf_sec_cipher_t cipher_list[] = { 0xC014 };
err = nrf_setsockopt(fd, NRF_SOL_SECURE, NRF_SO_CIPHERSUITE_LIST, cipher_list, sizeof(cipher_list));
if (err) {
/* Failed to set up cipher suite list. */
return -1;
}
Note that as in the case of other TLS/DTLS socket options, you must do this configuration before connecting to the server.