Add features signature subpacket parsing to PGPPacket
[gpg-migrate.git] / gpg-migrate.py
index 9fa4c026eb42263d07896b76a851c736ec988b6c..6055eb105020b88528ce07b113151590aa95ec2e 100755 (executable)
@@ -310,6 +310,9 @@ class PGPPacket (dict):
     def _str_key_flags_signature_subpacket(self, subpacket):
         return ', '.join(x for x in sorted(subpacket['key-flags']))
 
+    def _str_features_signature_subpacket(self, subpacket):
+        return ', '.join(x for x in sorted(subpacket['features']))
+
     def _str_embedded_signature_signature_subpacket(self, subpacket):
         return subpacket['embedded']['signature-type']
 
@@ -598,6 +601,11 @@ class PGPPacket (dict):
         if data[0] & 0x80:
             subpacket['key-flags'].add('private shared')
 
+    def _parse_features_signature_subpacket(self, data, subpacket):
+        subpacket['features'] = set()
+        if data[0] & 0x1:
+            subpacket['features'].add('modification detection')
+
     def _parse_embedded_signature_signature_subpacket(self, data, subpacket):
         subpacket['embedded'] = PGPPacket()
         subpacket['embedded']._parse_signature_packet(data=data)