aboutsummaryrefslogtreecommitdiffstats
path: root/mageiaSync
diff options
context:
space:
mode:
Diffstat (limited to 'mageiaSync')
-rw-r--r--mageiaSync/mageiaSyncExt.py7
-rw-r--r--mageiaSync/mageiasync.py9
2 files changed, 12 insertions, 4 deletions
diff --git a/mageiaSync/mageiaSyncExt.py b/mageiaSync/mageiaSyncExt.py
index 6bdc0bd..88703f3 100644
--- a/mageiaSync/mageiaSyncExt.py
+++ b/mageiaSync/mageiaSyncExt.py
@@ -31,10 +31,11 @@ class checkThread(QThread):
gpg = gnupg.GPG()
gpg.encoding = 'utf-8'
gpg.recv_keys('pgp.mit.edu', 'EDCA7A90')
- sig_file = self.destination+'/'+self.path+'/'+self.name+'.'+sumType+'.gpg'
+ sum_file = self.destination+'/'+self.path+'/'+self.name+'.'+sumType
+ sig_file = sum_file +'.gpg'
try:
with open(sig_file, 'rb') as g:
- verified = gpg.verify_file(g)
+ verified = gpg.verify_file(g,sum_file)
if verified.valid:
checkvalue=64
print('Valid signature')
@@ -46,7 +47,7 @@ class checkThread(QThread):
print('Signature file %s not found'%sig_file)
checkvalue = 32
try:
- fs=open(self.destination+'/'+self.path+'/'+self.name+'.'+sumType,'r')
+ fs=open(sum_file,'r')
except:
# reference file not found
return checkvalue
diff --git a/mageiaSync/mageiasync.py b/mageiaSync/mageiasync.py
index 64674e2..743cac8 100644
--- a/mageiaSync/mageiasync.py
+++ b/mageiaSync/mageiasync.py
@@ -273,10 +273,14 @@ class IsosViewer(QMainWindow, mageiaSyncUI.Ui_mainWindow):
else:
val=self.tr("Failed")
row=check
+ if row >= 64:
+ verified=True
+ row -= 64
if row >=32:
signed=False
row-=32
if not signed:
+ print("Row: ", row)
self.lvMessage("Signature for %s.md5 not found"%self.model.data(self.model.index(row,1)))
if verified:
# we add an icon for the GPG key
@@ -299,6 +303,9 @@ class IsosViewer(QMainWindow, mageiaSyncUI.Ui_mainWindow):
else:
val=self.tr("Failed")
row=check
+ if row >= 64:
+ verified=True
+ row -= 64
if row >=32:
signed=False
row-=32
@@ -308,7 +315,7 @@ class IsosViewer(QMainWindow, mageiaSyncUI.Ui_mainWindow):
if verified:
# we add an icon for the GPG key
self.lvMessage("Sha512 signature OK")
- self.model.setData(self.model.index(row, 4, QtCore.QModelIndex()),QIcon("preflight-verifier"),1)
+ self.model.setData(self.model.index(row, 3, QtCore.QModelIndex()),QIcon("preflight-verifier"),1)
self.model.setData(self.model.index(row, 3, QtCore.QModelIndex()), val)
def sizeUpdate(self,signal,isoSize):