From 315bd31dfa71ee9727dfeff232cdcff59ac1de57 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Mon, 27 Feb 2023 08:43:22 +0100 Subject: Check also non detached signature --- mageiaSync/mageiaSyncExt.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'mageiaSync') diff --git a/mageiaSync/mageiaSyncExt.py b/mageiaSync/mageiaSyncExt.py index e934143..2f29fa4 100644 --- a/mageiaSync/mageiaSyncExt.py +++ b/mageiaSync/mageiaSyncExt.py @@ -32,14 +32,19 @@ class checkThread(QThread): sig_file = sum_file +'.gpg' try: with open(sig_file, 'rb') as g: - verified = gpg.verify_file(g,sum_file) + verified = gpg.verify_file(g,close_file=False) if verified.valid: checkvalue=64 print('Valid signature') else: - print('Invalid signature for %s'%self.name+'.'+sumType) - print(verified.key_status) - return 0 + verified = gpg.verify_file(g, sum_file) + if verified.valid: + checkvalue=64 + print('Valid detached signature') + else: + print('Invalid signature for %s'%self.name+'.'+sumType) + print(verified.key_status) + return 0 except: print('Signature file %s not found'%sig_file) checkvalue = 32 -- cgit v1.2.1