From 3d9b39c47a3c90401f2c3fc7aecb68fbb417fa65 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Wed, 10 Jul 2019 19:47:02 +0200 Subject: Adapt signature checking to new method of signing of Mageia 7. --- backend/raw_write.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/raw_write.py b/backend/raw_write.py index 40a7de4..dbf8e19 100755 --- a/backend/raw_write.py +++ b/backend/raw_write.py @@ -160,7 +160,7 @@ class Dumper(object): self.sum_check_searched = True with open(sig_file, 'rb') as g: self.signature_found = True - verified = gpg.verify_file(g) + verified = gpg.verify_file(g, source + ".sha512") if verified.valid: self.signature_checked = True logging.debug("signature checked") @@ -205,16 +205,16 @@ class Dumper(object): f.close() if self.signature_found and not self.signature_checked: self.return_message = _('Invalid signature for %s.sha512')%source - if (self.sum_check == "") : + if (self.sum_check == "") : # Can't get stored sum self.return_message += _('SHA512 sum: {}').format(sha512sumcalc) # compare the sums elif (sha512sumcalc == self.sum_check) : if self.signature_checked: - self.return_message += _("The sha512 sum check is OK and the sum is signed") + self.return_message +="\n" + _("The sha512 sum check is OK and the sum is signed") else : - self.return_message += _("The sha512 sum check is OK but the signature can't be found") + self.return_message +="\n" + _("The sha512 sum check is OK but the signature can't be found") else: - self.return_message += _("/!\\The computed and stored sums don't match") + self.return_message +="\n" + _("/!\\The computed and stored sums don't match") #except: #pass self._progress = 100 -- cgit v1.2.1