diff options
author | Papoteur <papoteur@mageia.org> | 2023-02-27 08:43:22 +0100 |
---|---|---|
committer | Papoteur <papoteur@mageia.org> | 2023-02-27 08:43:22 +0100 |
commit | 315bd31dfa71ee9727dfeff232cdcff59ac1de57 (patch) | |
tree | 4181c491b45d88c034728c20a77f357fe465d326 /mageiaSync/mageiaSyncExt.py | |
parent | 8b48d5d141c2fbd55a37da00f4fda6c3c1bbdbe5 (diff) | |
download | MageiaSync-315bd31dfa71ee9727dfeff232cdcff59ac1de57.tar MageiaSync-315bd31dfa71ee9727dfeff232cdcff59ac1de57.tar.gz MageiaSync-315bd31dfa71ee9727dfeff232cdcff59ac1de57.tar.bz2 MageiaSync-315bd31dfa71ee9727dfeff232cdcff59ac1de57.tar.xz MageiaSync-315bd31dfa71ee9727dfeff232cdcff59ac1de57.zip |
Check also non detached signature
Diffstat (limited to 'mageiaSync/mageiaSyncExt.py')
-rw-r--r-- | mageiaSync/mageiaSyncExt.py | 13 |
1 files changed, 9 insertions, 4 deletions
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 |