chg: [PgpDump] PMF fix - longer keys are truncated

TODO: Need to be updated by an async process handling the keys
This commit is contained in:
Alexandre Dulaunoy 2019-05-24 14:10:06 +02:00
parent c27dfc035a
commit fae3530fec
Signed by: adulau
GPG key ID: 09E2CD4944E6CBCD

View file

@ -59,6 +59,9 @@ def extract_all_id(item_content, regex):
def get_pgp_packet(save_path):
save_path = '{}'.format(save_path)
print (len(save_path))
if len(save_path) > 131072:
save_path = save_path[:131071]
process1 = subprocess.Popen([ 'echo', '-e', save_path], stdout=subprocess.PIPE)
process2 = subprocess.Popen([ 'pgpdump'], stdin=process1.stdout, stdout=subprocess.PIPE)
process1.stdout.close()