feature(keyringctl): derive username from short key id fingerprints
Allow short key id fingerprints to be used with the username derive function by adding a glob in front of the fingerprint component.
This commit is contained in:
parent
60ee3d6d94
commit
147287959f
@ -718,7 +718,7 @@ def derive_username_from_fingerprint(keyring_dir: Path, certificate_fingerprint:
|
|||||||
A string representing the username a public key certificate belongs to, None otherwise
|
A string representing the username a public key certificate belongs to, None otherwise
|
||||||
"""
|
"""
|
||||||
|
|
||||||
matches = list(keyring_dir.glob(f"*/{certificate_fingerprint}"))
|
matches = list(keyring_dir.glob(f"*/*{certificate_fingerprint}"))
|
||||||
|
|
||||||
if len(matches) > 1:
|
if len(matches) > 1:
|
||||||
raise Exception(
|
raise Exception(
|
||||||
|
Loading…
Reference in New Issue
Block a user