diff options
author | Papoteur <papoteur@mageialinux-online.org> | 2016-12-18 13:46:39 +0100 |
---|---|---|
committer | Papoteur <papoteur@mageialinux-online.org> | 2016-12-18 13:46:39 +0100 |
commit | 908f95f2726663b1cb012eb9d63aa9b154ce5767 (patch) | |
tree | c8613c10be1ff439085969d5cce649b97812ea35 /mageiaSync/mageiasync.py | |
parent | e2fa703a83bb6a0137358c2bbd776441dd145b31 (diff) | |
download | MageiaSync-908f95f2726663b1cb012eb9d63aa9b154ce5767.tar MageiaSync-908f95f2726663b1cb012eb9d63aa9b154ce5767.tar.gz MageiaSync-908f95f2726663b1cb012eb9d63aa9b154ce5767.tar.bz2 MageiaSync-908f95f2726663b1cb012eb9d63aa9b154ce5767.tar.xz MageiaSync-908f95f2726663b1cb012eb9d63aa9b154ce5767.zip |
Change the logic on checking the signing
If signed and checking fails, not perform the sum, say failed.
Add messages on standard ouput
Diffstat (limited to 'mageiaSync/mageiasync.py')
-rw-r--r-- | mageiaSync/mageiasync.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mageiaSync/mageiasync.py b/mageiaSync/mageiasync.py index 365a847..c9c3fa6 100644 --- a/mageiaSync/mageiasync.py +++ b/mageiaSync/mageiasync.py @@ -260,33 +260,54 @@ class IsosViewer(QMainWindow, mageiaSyncUI.Ui_mainWindow): def md5Check(self,check): verified=False + signed=True if check>=128: val=self.tr("OK") row=check-128 if row >= 64: verified=True row -= 64 + if row >= 32: + row -= 32 + signed=False else: val=self.tr("Failed") row=check + if row >=32: + signed=False + row-=32 + if not signed: + 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 self.model.setData(self.model.index(row, 4, QtCore.QModelIndex()),QIcon("preflight-verifier"),1) + self.lvMessage("MD5 Signature OK") self.model.setData(self.model.index(row, 4, QtCore.QModelIndex()), val) def sha1Check(self,check): verified=False + signed=True if check>=128: val=self.tr("OK") row=check-128 if row >= 64: verified=True row -= 64 + if row >= 32: + row -= 32 + signed=False else: val=self.tr("Failed") row=check + if row >=32: + signed=False + row-=32 + print(row) + if not signed: + self.lvMessage("Signature for %s.sha512 not found"%self.model.data(self.model.index(row,1))) 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()), val) |