Bug 1340093 - Signing server: Pass digest algorithm to jarsigner command r=rail FENNEC_52_0b10_BUILD1 FENNEC_52_0b10_RELEASE
authorJohan Lorenzo <jlorenzo@mozilla.com>
Thu, 16 Feb 2017 16:11:24 +0100
changeset 7331 f27b452a2be5
parent 7330 29071558979d
child 7332 f979710567c1
push id5458
push userjlorenzo@mozilla.com
push dateFri, 24 Feb 2017 18:15:36 +0000
reviewersrail
bugs1340093
Bug 1340093 - Signing server: Pass digest algorithm to jarsigner command r=rail MozReview-Commit-ID: 18FkTh8chr0
lib/python/signing/utils.py
--- a/lib/python/signing/utils.py
+++ b/lib/python/signing/utils.py
@@ -248,17 +248,23 @@ def jar_unsignfile(filename):
         raise ValueError("Couldn't remove previous signature")
 
 
 def jar_signfile(filename, keystore, keyname, fake=False, passphrase=None):
     """Sign a jar file
     """
     # unsign first
     jar_unsignfile(filename)
-    command = ["jarsigner", "-keystore", keystore, filename]
+    command = [
+        "jarsigner",
+        "-keystore", keystore,
+        "-digestalg", "SHA1",
+        "-sigalg", "SHA1withDSA",
+        filename
+    ]
     if keyname:
         command.append(keyname)
     stdout = tempfile.TemporaryFile()
     try:
         log.debug("running %s", command)
         proc = Popen(command, stdout=stdout, stderr=STDOUT, stdin=PIPE)
         if passphrase:
             passphrases = passphrase.split(' ')