aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageia.org>2023-02-27 08:43:22 +0100
committerPapoteur <papoteur@mageia.org>2023-02-27 08:43:22 +0100
commit315bd31dfa71ee9727dfeff232cdcff59ac1de57 (patch)
tree4181c491b45d88c034728c20a77f357fe465d326
parent8b48d5d141c2fbd55a37da00f4fda6c3c1bbdbe5 (diff)
downloadMageiaSync-315bd31dfa71ee9727dfeff232cdcff59ac1de57.tar
MageiaSync-315bd31dfa71ee9727dfeff232cdcff59ac1de57.tar.gz
MageiaSync-315bd31dfa71ee9727dfeff232cdcff59ac1de57.tar.bz2
MageiaSync-315bd31dfa71ee9727dfeff232cdcff59ac1de57.tar.xz
MageiaSync-315bd31dfa71ee9727dfeff232cdcff59ac1de57.zip
Check also non detached signature
-rw-r--r--mageiaSync/mageiaSyncExt.py13
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