Comment 0 for bug 1144781

Redsandro (redsandro) wrote :

With python-gnomekeyring you can get the "name" and the "secret" of a key.

But when you add LUKS passwords that are remembered forever in the gvfs-mount dialog for two or more of the same harddrives, there is a problem getting the secret manually.

GnomeKeyringItemInfo at 0x1960d70
Name: Encryption passphrase for Seagate ST31000333AS (1.0 TB Hard Disk)
Secret: Password001

GnomeKeyringItemInfo at 0x18cf3c0
Name: Encryption passphrase for Seagate ST31000333AS (1.0 TB Hard Disk)
Secret: Password002

The name has multiple results, so you can no longer loop to find the related name. In this case you would want to get the details. If you check the Details-tab in Seahorse (AKA "Passwords and Keys" dialog), you'll see exactly what you need:
gvfs-luks-uuid: 5cf35067-5fd0-4a0f-a240-3b4725975ec9
gvfs-luks-uuid: 7fe09d7a-a68b-4776-a78d-df0ef4412e14

But how does Seahorse know this? I cannot get this from GnomeKeyringItemInfo items.