Skip to content
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

DTLS Connection ID Support #793

Closed
wants to merge 452 commits into from

Conversation

plskeggs
Copy link
Contributor

This updates commits from zephyrproject-rtos/zephyr#36738, and builds on them.
This is a downstream version of my upstream PR zephyrproject-rtos/zephyr#44914

  • point to PR for mbed TLS also for CID: DTLS CID zephyrproject-rtos/mbedtls#36
  • complete the existing support for user-provided cipherlist so it functions
  • improve debug logging
  • add extended master secret control
  • enable server name indication for DTLS even if x509 certs not enabled
  • add function to query the peer's CID

@NordicBuilder
Copy link
Contributor

NordicBuilder commented May 17, 2022

The following west manifest projects have been modified in this Pull Request:

Name Old Revision New Revision Diff
mbedtls zephyrproject-rtos/mbedtls@6e16605 zephyrproject-rtos/mbedtls#36 zephyrproject-rtos/mbedtls#36/files

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@plskeggs plskeggs force-pushed the feature-dtls-cid-zupmerge branch 2 times, most recently from 2f81b33 to bb7224a Compare May 25, 2022 01:54
@plskeggs plskeggs force-pushed the feature-dtls-cid-zupmerge branch 3 times, most recently from e3356fc to 665181a Compare June 1, 2022 20:00
@plskeggs plskeggs marked this pull request as ready for review June 1, 2022 22:51
Copy link
Contributor

@mbolivar-nordic mbolivar-nordic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No objections as long as you really need this now and cannot wait for the next upmerge.

de-nordic and others added 19 commits April 11, 2023 15:09
The commit adds bootutil hook, for nrf5340, to allow it
handling the non-accessible image-1/primary slot.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
(cherry picked from commit 5507eaa)
(cherry picked from commit 87784a6)
If WPA supplicant is enabled at build time, then use the WPA
supplicant APIs, else use offload driver APIs. Use z_wpa_supplicant as
the name space.

Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
(cherry picked from commit 2104c26)
(cherry picked from commit be420be)
(cherry picked from commit 1767131)
(cherry picked from commit 5ec011d)
Added definitions for Arduino headers and MCUboot button and LED.

Signed-off-by: Kristoffer Rist Skøien <kristoffer.skoien@nordicsemi.no>
(cherry picked from commit ee2c367)
…r audio codec

The board embeds an audio codec IC, Cirrus CS42L73. While there is no
in-tree driver for it, we need a binding to describe how it is wired in
the board, e.g. for IRQ/RESET lines.

Following Linux binding for the same IC, create one in
dts/bindings/sound. Note that Linux binding is less complete/outdated.

Ref. https://statics.cirrus.com/pubs/proDatasheet/CS47L63_DS1249F2.pdf

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
(cherry picked from commit 65512e9)
…scription

nRF5340 Audio DK embeds a voltage divider to identify the "board ID".
Use the existing 'voltage-divider' binding to describe it. Also
configure the ADC channel 0 to read the voltage divider value.
Configuration from
https://github.com/nrfconnect/sdk-nrf/blob/main/applications/
nrf5340_audio/src/utils/board_version.c
has been taken.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
(cherry picked from commit c1a1108)
… gpio hogs

The nRF5340 Audio DK provides a multiplexer circuit that allows to
interface the audio codec by an external master. Use GPIO hogs to
initialize the multiplexers correctly.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
(cherry picked from commit 20d34bd)
…s disabled

In case native IPv6 is disabled, Kconfig entries related to native IPv6
stack should not be enabled. Otherwise, circular dependencies can be
created if native stack is disabled, as in case of recent changes in
NET_IPV6_RA_RDNSS option (where a dependency for a native stack module
was enabled).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit dc8f023)
…ecting

When the CIS is connecting we should not allow sending the
receiver start ready command.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
(cherry picked from commit b7e2652)
The unicast client would attempt to send the
receiver start ready opcode to the server for
source ASEs before the CIS was connected, which
is a spec violation.

The code has been refactored to set a boolean,
and then send the receiver start ready opcode on
CIS connection instead.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
(cherry picked from commit bdbfcb1)
…d move tfm_merged

Move tfm_merged.hex from <build>/tfm_merged.hex to
<build>/zephyr/tfm_merged.hex.
Use relative path to the runners.yaml hex file.

This makes it possible to move the build folder.
Example would be to copy out the runners.yaml and tfm_merged.hex file
and still be able to call west flash --skip-rebuild.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
(cherry picked from commit fc54d1ac5c63739e9b044c6a4fa318141d789a81)
In some cases built binary files have different names than "zephyr.hex"
files, and for those cases, information about names of file to keep
should be taken from runners.yaml file.

Moreover if in runners.yaml file exist absolute files paths to binary
files, then they should be changed to relative ones.

Signed-off-by: Piotr Golyzniak <piotr.golyzniak@nordicsemi.no>
(cherry picked from commit d98afb1)
- Check OCR when sending CMD58, reject if 0

Signed-off-by: Alexander Svensen <alexander.svensen@nordicsemi.no>
(cherry picked from commit 674e238)
Remove a bad LOG_ERR that should never have been merged.

Added the valuet that was logged to the debug log statement.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
(cherry picked from commit cf737b5)
fixup! [nrf noup] mgmt/mcumgr: Bootutil hooks to handle image-1

Migrate to new MCUmgr Kconfig options and change select to imply
to allow user to disable BOOT_IMAGE_ACCESS_HOOKS.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This commit updates the pull request assigner workflow to use the
Ubuntu 22.04 virtual environment.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
(cherry picked from commit e701ec5)
(cherry picked from commit f576597)
This commit updates the manifest workflow to use the Ubuntu 22.04
virtual environment.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
(cherry picked from commit 44a8b70)
(cherry picked from commit d8956dc)
…TLS_DEBUG

Allows using MBEDTLS_DEBUG functionality when not using MBEDTLS_BUILTIN.

Signed-off-by: Vidar Lillebø <vidar.lillebo@nordicsemi.no>
(cherry picked from commit ca3d0c8)
…tion

Implement TLS_DTLS_CONNECTION_ID socket option, which enables to use
Connection ID extension for the DTLS session.

The option allows to set the value and the length of the CID to use with
`setsockopt()` function. Setting the CID length to 0, enables the
extension but does not send the own CID to the peer, as described in the
specification.

Upstream PR: zephyrproject-rtos/zephyr#44914

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Signed-off-by: Pete Skeggs <peter.skeggs@nordicsemi.no>
…nnection ID

Add Kconfig option for `config-tls-generic.h` to enable DTLS Connection
ID extension.

Upstream PR: zephyrproject-rtos/zephyr#44914

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
DTLS systems can accept the Server Name Indication extension
without using X509 certificates.  Allow this for either
MBEDTLS_X509_CRT_PARSE_C or CONFIG_MBEDTLS_DTLS.

Upstream PR: zephyrproject-rtos/zephyr#44914

Signed-off-by: Pete Skeggs <peter.skeggs@nordicsemi.no>
DTLS systems can accept the Server Name Indication extension
without using X509 certificates.  Allow this for either
MBEDTLS_X509_CRT_PARSE_C or CONFIG_MBEDTLS_DTLS.

Upstream PR: zephyrproject-rtos/zephyr#44914

Signed-off-by: Pete Skeggs <peter.skeggs@nordicsemi.no>
Add function to get the peer CID.  Add case
to ztls_getsockopt_ctx() to call it when
optname is TLS_DTLS_PEER_CONNECTION_ID.

zephyrproject-rtos/zephyr#44914

Signed-off-by: Pete Skeggs <peter.skeggs@nordicsemi.no>
@plskeggs
Copy link
Contributor Author

Upstream PR merged today zephyrproject-rtos/zephyr#61483.

Should be in sdk-zephyr with the next upmerge.

@beriberikix
Copy link

@plskeggs do you know when the next upmerged is planned? Thanks!

@de-nordic
Copy link
Contributor

@plskeggs do you know when the next upmerged is planned? Thanks!

It is already part of next upmerge here: nrfconnect/sdk-nrf#12112, the upmerge is going through tests now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.