aboutsummaryrefslogtreecommitdiffstats
path: root/backend/magiback
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageia.org>2018-10-19 09:01:16 +0200
committerPapoteur <papoteur@mageia.org>2018-10-19 09:01:16 +0200
commit0835bde83d98dc26912de3d5025d516667a07798 (patch)
tree76c55aa0ad8d8f22e6150aeb043317972bccb55f /backend/magiback
parentae4851d5496d3bd2e7cf86cabda0eb37d0553dc2 (diff)
downloadisodumper-0835bde83d98dc26912de3d5025d516667a07798.tar
isodumper-0835bde83d98dc26912de3d5025d516667a07798.tar.gz
isodumper-0835bde83d98dc26912de3d5025d516667a07798.tar.bz2
isodumper-0835bde83d98dc26912de3d5025d516667a07798.tar.xz
isodumper-0835bde83d98dc26912de3d5025d516667a07798.zip
Separate getting key and checking signature in a thread
Review the logic of checking
Diffstat (limited to 'backend/magiback')
-rwxr-xr-xbackend/magiback10
1 files changed, 10 insertions, 0 deletions
diff --git a/backend/magiback b/backend/magiback
index 7c56253..904afcf 100755
--- a/backend/magiback
+++ b/backend/magiback
@@ -36,6 +36,9 @@ class Isodumper(raw_write.Dumper):
<arg type='s' name='target' direction='in'/>
<arg type='s' name='source' direction='in'/>
</method>
+ <method name='get_sum'>
+ <arg type='s' name='source' direction='in'/>
+ </method>
<method name='end'>
<arg type='b' name='success' direction='out'/>
<arg type='s' name='message' direction='out'/>
@@ -61,6 +64,9 @@ class Isodumper(raw_write.Dumper):
self.return_message = ""
self.authorized_sender_read = set()
self.authorized_sender_write = set()
+ self.sum_check = ""
+ self.sum_check_searched = False
+ self.signature_checked = False
def do_write(self,source, target, size, dbus_context):
self.finished.clear()
@@ -99,6 +105,10 @@ class Isodumper(raw_write.Dumper):
print("Unmounting")
return self._do_unmount([device])
+ def get_sum(self, source):
+ key_thread = threading.Thread(target=self._get_sum, args=(source,))
+ key_thread.start()
+
def check_write(self,target, source):
self.thread = threading.Thread(target=self._check_write, args=(target, source,))
self.thread.start()