[releng] sigulsign_unsigned: add get_public_key()

Till Maas till at fedoraproject.org
Mon Oct 27 20:59:08 UTC 2014


commit 5da8d841b1dc77f3fbae9ee9a854d2babb5e42d4
Author: Till Maas <opensource at till.name>
Date:   Mon Oct 27 22:00:18 2014 +0100

    sigulsign_unsigned: add get_public_key()

 scripts/sigulsign_unsigned.py |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/scripts/sigulsign_unsigned.py b/scripts/sigulsign_unsigned.py
index b401d89..3a9b185 100755
--- a/scripts/sigulsign_unsigned.py
+++ b/scripts/sigulsign_unsigned.py
@@ -358,12 +358,16 @@ class SigulHelper(object):
         self.config_file = config_file
         self.arch = arch
 
-        command = self.build_cmdline('get-public-key', self.key)
-        ret, pubkey, stderr = self.run_command(command)
+        ret, pubkey, stderr = self.get_public_key()
         if ret != 0:
             raise ValueError("Invalid key or password: " + stderr)
         self.keyid, self.v3 = get_key_info(pubkey)
 
+    def get_public_key(self):
+        command = self.build_cmdline('get-public-key', self.key)
+        ret, stdout, stderr = self.run_command(command)
+        return ret, stdout, stderr
+
     def build_cmdline(self, *args):
         cmdline = ['sigul', '--batch']
         if self.config_file:


More information about the rel-eng mailing list