Skip to content
Snippets Groups Projects
Verified Commit 5a83a7b6 authored by Levente Polyak's avatar Levente Polyak :rocket:
Browse files

feature(keyringctl): skip user attribute packets as none relevant

parent 3d8e88df
No related branches found
No related tags found
No related merge requests found
......@@ -163,6 +163,10 @@ def convert_certificate( # noqa: ignore=C901
current_packet_uid = Uid(simplify_ascii(packet_dump_field(packet, "Value")))
uids[current_packet_uid] = packet
elif packet.name.endswith("UserAttribute"):
current_packet_mode = "uattr"
current_packet_fingerprint = None
current_packet_uid = None
elif packet.name.endswith("--PublicSubkey"):
current_packet_mode = "subkey"
current_packet_fingerprint = Fingerprint(packet_dump_field(packet, "Fingerprint"))
......@@ -170,6 +174,11 @@ def convert_certificate( # noqa: ignore=C901
subkeys[current_packet_fingerprint] = packet
elif packet.name.endswith("--Signature"):
# ignore user attributes and related signatures
if current_packet_mode == "uattr":
debug("skipping user attribute signature packet")
continue
if not certificate_fingerprint:
raise Exception('missing certificate fingerprint for "{packet.name}"')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment