gpg --list-packets, which outputs
having returned something like:
:pubkey enc packet: version 4, algo 1, keyid 08D014DED0B337AA
data: [4095 bits]
:pubkey enc packet: version 4, algo 16, keyid 921EB6497074473C
data: [1024 bits]
data: [1021 bits]
:encrypted data packet:
length: 69
mdc_method: 2
:compressed packet: algo=2
:literal data packet:
mode b (62), created 1305194688, name="foo.txt",
raw data: 4 bytes
What im interested in, is the version number (version 4 in this example), I have a working script which is validating the version and some other parameters and rejecting keys which are not on version 4.Tried to check list_keys() scan_keys() methods looking for this parameter but with no luck.Following the documentation I decided then to try to include in the gpg object instantation within the 'option' attribute the '--list-packets' str eg.
gpg_object = gnupg.GPG(gnupghome=tempdir, options='--list-packets')and then calling scan_keys for a given key, but the result is null, pretty sure im doing this workaround not in the correct way, tried to debug and I see the option passed to self.option but can't see scan_keys doing anything with that info, could It be in collision with some other parameters already?
key_info = gpg_object.scan_keys(key_file)Looking for some help, thanks!
--
---
You received this message because you are subscribed to the Google Groups "python-gnupg" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-gnupg...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Any other possibility to retrieve the 'key version' attribute using python-gnupg library?
--