Add type and raw data to embedded signature subpackets
authorW. Trevor King <wking@tremily.us>
Mon, 23 Dec 2013 23:40:57 +0000 (15:40 -0800)
committerW. Trevor King <wking@tremily.us>
Mon, 23 Dec 2013 23:43:16 +0000 (15:43 -0800)
Reduce the differences between embedded and regular signature packets.
Also add an 'embedded' key (set to True) for situations where we *do*
want to distinguish between embedded and regular packets.

gpg-migrate.py

index f4651e37fb6a74fd12462aa47778be405843ee77..1d139a002936a4e3d62eae66b3b858d03846c309 100755 (executable)
@@ -813,7 +813,10 @@ class PGPPacket (dict):
 
     def _parse_embedded_signature_signature_subpacket(self, data, subpacket):
         subpacket['embedded'] = PGPPacket(key=self.key)
+        subpacket['embedded']['type'] = 'signature packet'
+        subpacket['embedded']['embedded'] = True
         subpacket['embedded']._parse_signature_packet(data=data)
+        subpacket['embedded']['raw'] = data
 
     def _parse_user_id_packet(self, data):
         self['user'] = str(data, 'utf-8')