Skip to content

wifi: Fix runtime certs #2724

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
merged 23 commits into from
Apr 11, 2025
Merged

Conversation

krish2718
Copy link
Contributor

Fix build error and convert script to python for cross-platform support. (Simple changes, but due to fromlist, had to revert and reapply).

@krish2718 krish2718 force-pushed the fix_runtime_certs branch from 103d554 to 2db4b49 Compare April 8, 2025 14:37
@krish2718 krish2718 force-pushed the fix_runtime_certs branch from 2db4b49 to b2b0d77 Compare April 9, 2025 13:16
…ing delete"

This reverts commit f6e0862.

Signed-off-by: Chaitanya Tata <[email protected]>
… credentials"

This reverts commit e3269af.

Signed-off-by: Chaitanya Tata <[email protected]>
…for heap"

This reverts commit f3dc6eb.

Signed-off-by: Chaitanya Tata <[email protected]>
…icates"

This reverts commit d42adf0.

Signed-off-by: Chaitanya Tata <[email protected]>
Using TLS credentials library add support for run-time certificates where
the installed certs are retrieved from the credential store (as of now
only volatile backend is tested).

This helps in production environments.

Implements #79564.

Upstream PR #: 87656

Signed-off-by: Chaitanya Tata <[email protected]>
The volatile backend stores the credentials on the heap, so, explicitly
add a config option that can be overridden in case there are more certs
than the default.

Upstream PR #: 87656

Signed-off-by: Chaitanya Tata <[email protected]>
Instead of having an overlay move the Enterprise configurations to a
dedicated snippet so that it can be enabled with any sample.

Can be used along with Wi-Fi snippet e.g., `-S
"wifi-ipv4;wifi-enterprise"`.

Upstream PR #: 87656

Signed-off-by: Chaitanya Tata <[email protected]>
…ials

Enable TLS credentials shell to manager Wi-Fi enterprise certs.

Upstream PR #: 87656

Signed-off-by: Chaitanya Tata <[email protected]>
Deletion of credential should use the pointer from the reference slot
not the temporary buffer, this causes a crash (unknown error).

Upstream PR #: 87656

Signed-off-by: Chaitanya Tata <[email protected]>
Certificates usage depends on STA/AP mode, but we don't have that
information at a build time, so, make all certs as optional and if a
file isn't found then generate an empty header so that corresponding C
code will be built.

Any missing mandatory certificates will be validated before connection
and connection is failed.

Upstream PR #: 87656

Signed-off-by: Chaitanya Tata <[email protected]>
RSA3K based certs are not supported on all platforms, so, keep both
variants, rsa2k (the older certs but with longer expiry 9999 days) and
rsa3k (latest ones) and we can have more variants in this folders.

Also, add a cmake variable to override the path with default as rsa3k.

Upstream PR #: 87656

Signed-off-by: Chaitanya Tata <[email protected]>
The command should work with existing certs rather than a generic
example, also fix the key-management.

Upstream PR #: 87656

Signed-off-by: Chaitanya Tata <[email protected]>
For enterprise mode we need to install multiple certs to the TLS
credentials store, so, add a helper script in python to make it work
cross-platforms.

Upstream PR #: 87656

Signed-off-by: Chaitanya Tata <[email protected]>
…ime certs

This is needed to ensure run-time certs feature builds.

Upstream PR #: 87656

Signed-off-by: Chaitanya Tata <[email protected]>
jukkar and others added 4 commits April 10, 2025 01:55
Add information about "struct net_linkaddr" changes to 4.2
migration guide to help the developers to handle issues if
they access the net_linkaddr struct fields directly in their
code.

Signed-off-by: Jukka Rissanen <[email protected]>
(cherry picked from commit 152a03b)
use hyphen instead of underscore in order to comply with device tree
specification.

Signed-off-by: Jilay Pandya <[email protected]>
(cherry picked from commit 0a4acd8)
…mple'

Improve naming of the scheduler and call it what it is: simple. Using
'dumb' for the default scheduler algorithm in Zephyr is a bad idea.

Signed-off-by: Anas Nashif <[email protected]>
(cherry picked from commit f29ae72)
…R_CERTIFICATE

TLS_CREDENTIAL_SERVER_CERTIFICATE credential type is misleading, as in
fact it just represents a public certificate, it does not matter if the
certificate belongs to a server or a client. And actually, it was
already used in-tree for clients as well, for example in LwM2M.

Therefore rename the credential type to a more generic
TLS_CREDENTIAL_PUBLIC_CERTIFICATE and deprecate the old one.

Signed-off-by: Robert Lubos <[email protected]>
(cherry picked from commit a61287e)
@krish2718 krish2718 force-pushed the fix_runtime_certs branch from b2b0d77 to cca7995 Compare April 9, 2025 20:25
Copy link

sonarqubecloud bot commented Apr 9, 2025

@carlescufi carlescufi merged commit cb2537e into nrfconnect:main Apr 11, 2025
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport v4.0.99-ncs1-branch Relates to NCS v3.0-branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants