summaryrefslogtreecommitdiff
path: root/mesh/appkey.c
Commit message (Collapse)AuthorAgeFilesLines
* mesh: Reply error if appkey added for wrong netkeyIsak Westin2022-09-231-1/+3
| | | | | If a known appkey is added for a different netkey, the status reply should be Invalid NetKey.
* mesh/appkey: Fix memory leaksGopal Tiwari2022-05-311-2/+6
| | | | | | | | | | | | While performing the static analysis using the coverity tool found following memory leak reports bluez-5.64/mesh/appkey.c:143: leaked_storage: Variable "key" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-772): bluez-5.64/mesh/appkey.c:146: leaked_storage: Variable "key" going out of scope leaks the storage it points to.
* mesh: Update AppKeys on transition to Phase 0Michael N. Moran2021-01-041-2/+31
| | | | | | | | | | At the end of the mesh Key Refresh procedure when a subnet transitions to Phase 0, local AppKeys that were updated were not updating until the bluetooth-meshd daemon was restarted. This patch iterates the AppKeys at the end of mesh Key Refresh when the subnet transitions to Phase 0, setting the new state of each updated AppKey.
* mesh: Fix errors found by static analysisInga Stotland2020-11-101-3/+3
| | | | | This fixes a NULL pointer dereference error (cfgmod-server.c) and miscellaneous issues related to unchecked return status.
* mesh: Add SPDX License IdentifierTedd Ho-Jeong An2020-09-211-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds SPDX License Identifier and removes the license text. ------------------------------------- License COUNT ------------------------------------- LGPL-2.1-or-later : 48 License: LGPL-2.1-or-later mesh/mesh-mgmt.h mesh/mesh-mgmt.c mesh/net-keys.c mesh/mesh-io-api.h mesh/mesh.h mesh/net-keys.h mesh/model.h mesh/util.h mesh/appkey.c mesh/cfgmod.h mesh/appkey.h mesh/prov.h mesh/prov-acceptor.c mesh/net.c mesh/dbus.h mesh/friend.h mesh/mesh-io-generic.c mesh/main.c mesh/util.c mesh/dbus.c mesh/error.h mesh/mesh-config-json.c mesh/agent.h mesh/pb-adv.c mesh/crypto.c mesh/crypto.h mesh/friend.c mesh/pb-adv.h mesh/provision.h mesh/mesh-config.h mesh/mesh-io-generic.h mesh/agent.c mesh/cfgmod-server.c mesh/mesh-io.h mesh/keyring.h mesh/net.h mesh/keyring.c mesh/mesh-defs.h mesh/mesh.c mesh/rpl.c mesh/manager.c mesh/model.c mesh/mesh-io.c mesh/node.c mesh/prov-initiator.c mesh/rpl.h mesh/node.h mesh/manager.h
* mesh: Allow deleting non-existing app keyMichał Lowas-Rzechonek2020-08-061-1/+1
| | | | | | | | | Mesh Profile v1.0.1, section 4.3.2.40 Config AppKey Status (...) The Status Code shall be Success if the received request was redundant (add of an identical existing key, update of an identical updated key, or delete of a non-existent key), with no further action taken.
* mesh: Move Replay Protection to mesh/net.cBrian Gix2020-01-301-102/+0
| | | | | | | The specification calls for a flatter Replay Protection List that applies to all processed messages, regardless of which credentials were used to secure them. So storage and checking is now centralized in mesh/net.c
* mesh: Fix wholesale deletion of appkeys bound to a netkeyInga Stotland2020-01-141-5/+21
| | | | | | | | | When a netkey is deleted all the appkeys bound to this key has to be deleted as well. This fixes app_key queue manipulation to avoid issues caused by modifying the queue while iterating over it: instead of iteration over all the entries, find a first bound key, delete it, find next... and so on, until there are no bound keys left in the app_keys queue.
* mesh: Fix logic in AppKey deletionInga Stotland2020-01-141-3/+3
| | | | | | | | When deleting an AppKey from a node, call mesh_config_app_key_del() only from appkey level (i.e., keep it contained in appkey.c and remove the duplicate call in node.c) Also, simplify the node_app_key_delete() argument list.
* mesh: Align appkey_packet_decrypt with dev and virt variants.Michał Lowas-Rzechonek2019-10-031-91/+20
| | | | | | | | | Move appkey_packet_decrypt to mesh/model, rename it to app_packet_decrypt, make it private and change arguments to be aligned with other decryption functions. Also, simplify the implementation using an inline loop, removing the need of mod_decrypt struct.
* mesh: Add bound Net Index lookup for App KeysBrian Gix2019-07-181-21/+38
| | | | | This patch also normalizes the naming convention in favor of key_aid when referring to the calculated AID of the used Access Layer key.
* mesh: Use mesh_config APIs to store node configurationInga Stotland2019-07-151-4/+15
| | | | | | | | This eliminates storage_set...() routines as an intermediate layer between mesh_config layer and the rest of the daemon when storing updated node configuration values. For the JSON based implementation, each call to mesh_config_write...() routines results in writing to the node configuration file.
* mesh: Remove unnecessary includes from .c filesInga Stotland2019-05-171-2/+0
|
* mesh: Update copyright datesInga Stotland2019-05-171-1/+1
|
* mesh: Return correct error code for AppKey List commandInga Stotland2019-02-191-0/+3
| | | | | If AppKey List command is called with a network key index that is not valid for the node, return Invalid NetKey Index error code
* mesh: Separate functions for app key add and updateInga Stotland2019-02-191-38/+51
| | | | | | | This splits appkey_key_add() into two separate functions: app_key_add() and app_key_update(). Fix checks for miscellaneous invalid conditions and return appropriate error status.
* mesh: Clean up App Key configuration and storageInga Stotland2019-01-081-9/+10
| | | | | | Fix miscellaneous issues: use l_debug instead of l_info for debug logs; remove "local" from functions names (this handles only local app keys); add missing App Key index initialization.
* build: Move declaration of _GNU_SOURCE back into individual source filesMarcel Holtmann2018-12-061-0/+1
|
* mesh: Source files for mesh access layer and utilitiesInga Stotland2018-08-201-0/+536
This adds initial implementation of BT Mesh access layer functionality plus utilities.