To list the keys in the internal database or using an external key provider, the command:
LISTKEYS pattern
is used. To allow multiple patterns (which are ORed during the search) quoting is required: Spaces are to be translated into "+" or into "%20"; in turn this requires that the usual escape quoting rules are done.
LISTSECRETKEYS pattern
Lists only the keys where a secret key is available.
The list commands commands are affected by the option
OPTION list-mode=mode
where mode may be:
0
1
2
3
Note that options are valid for the entire session.