pvsecret: Support retrieving a secret by index

Allow users to retrieve a secret by its index. This allows users to
extract a specific secret in case of multiple ids.

Reviewed-by: Finn Callies <fcallies@linux.ibm.com>
Tested-by: Finn Callies <fcallies@linux.ibm.com>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Steffen Eiden
2025-04-23 11:24:28 +02:00
committed by Jan Höppner
parent e62cdf9a6e
commit 1fefdecbe7
2 changed files with 60 additions and 28 deletions
+2
View File
@@ -351,6 +351,8 @@ pub enum RetrInpFmt {
Hex,
/// Use a name-string. Will hash it if no secret with the name found.
Name,
/// Use the secret-index (base 10) instead of the secret-ID
Idx,
}
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, ValueEnum, Debug, Default)]