]> git.ipfire.org Git - thirdparty/iw.git/commit
iw: add support for retrieving keys
authorRaphaël Mélotte <raphael.melotte@mind.be>
Thu, 12 Jan 2023 12:25:25 +0000 (13:25 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 18 Jan 2023 10:22:06 +0000 (11:22 +0100)
commitcc660ccb9a83ec23b672eef178e9b494d95e763d
tree6e6917353a60a93b927ac482bb3b3b46321d95dc
parentc4743bbc1b1953bdc035b871ea1899ca94c1c6ac
iw: add support for retrieving keys

For debugging purposes, it can be useful to be able to retrieve keys.

Add a "iw key get" command, to be able to retrieve keys when the key
index is known. A new "key" section is also introduced, in preparation
for future key-related commands.

Example retrieving a pairwise key:
iw dev wlan0 key get 0 02:02:03:04:05:06

Example retrieving a group key:
iw dev wlan0 key get 1

Note that only the outer ATTR_KEY_DATA (and seq) is reported, the
nested KEY_DATA (and seq) within ATTR_KEY is not.

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
Link: https://lore.kernel.org/r/20230112122525.2257298-1-raphael.melotte@mind.be
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
keys.c [new file with mode: 0644]