From e506052433418c27c3cbf48b859f6027cf18edf8 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 19 Dec 2013 21:27:27 -0800 Subject: [PATCH] Decode public key algorithm in _parse_generic_public_key_packet It's easier for humans to parse the text representation ;). --- gpg-migrate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gpg-migrate.py b/gpg-migrate.py index e75cab8..d2049c2 100755 --- a/gpg-migrate.py +++ b/gpg-migrate.py @@ -201,9 +201,10 @@ class PGPPacket (dict): 'public (sub)key packet version {}'.format( self['key-version'])) length = 5 - self['creation_time'], self['public-key-algorithm'] = _struct.unpack( + self['creation-time'], algorithm = _struct.unpack( '>IB', data[offset: offset + length]) offset += length + self['public-key-algorithm'] = self._public_key_algorithms[algorithm] self['key'] = data[offset:] def to_bytes(self): -- 2.26.2