Backout 7d2c2b392b18
authorBrian R. Bondy <netzen@gmail.com>
Thu, 16 Oct 2014 22:19:57 -0400
changeset 491333 2cb6e4e5063a4cf35c868fcc439ac5e32db57963
parent 491332 18dc1708c1b78859af183b7ab891b517a5699cf0
child 491334 32b6baaf59bf17536acd1e719ac1cf7c59fd8541
push id47343
push userbmo:dothayer@mozilla.com
push dateWed, 01 Mar 2017 22:58:58 +0000
milestone36.0a1
backs out7d2c2b392b1874bb612dcc502337fffb6347eb18
Backout 7d2c2b392b18
toolkit/mozapps/update/updater/Makefile.in
toolkit/mozapps/update/updater/gen_cert_header.py
toolkit/mozapps/update/updater/moz.build
--- a/toolkit/mozapps/update/updater/Makefile.in
+++ b/toolkit/mozapps/update/updater/Makefile.in
@@ -17,32 +17,16 @@ ifdef MOZ_DEBUG
 MOZ_WINCONSOLE = 1
 else
 MOZ_WINCONSOLE = 0
 endif
 endif
 
 include $(topsrcdir)/config/rules.mk
 
-ifneq (,$(filter beta release esr,$(MOZ_UPDATE_CHANNEL)))
-	PRIMARY_CERT = release_primary.der
-	SECONDARY_CERT = release_secondary.der
-else ifneq (,$(filter nightly aurora nightly-elm nightly-profiling nightly-oak nightly-ux,$(MOZ_UPDATE_CHANNEL)))
-	PRIMARY_CERT = nightly_aurora_level3_primary.der
-	SECONDARY_CERT = nightly_aurora_level3_secondary.der
-else
-	PRIMARY_CERT = dep1.der
-	SECONDARY_CERT = dep2.der
-endif
-
-export::
-	$(PYTHON) $(srcdir)/gen_cert_header.py primaryCertData $(srcdir)/$(PRIMARY_CERT) > primaryCert.h
-	$(PYTHON) $(srcdir)/gen_cert_header.py secondaryCertData $(srcdir)/$(SECONDARY_CERT) > secondaryCert.h
-	$(PYTHON) $(srcdir)/gen_cert_header.py xpcshellCertData $(srcdir)/xpcshellCertificate.der > xpcshellCert.h
-
 ifdef MOZ_WIDGET_GTK
 libs:: updater.png
 	$(NSINSTALL) -D $(DIST)/bin/icons
 	$(INSTALL) $(IFLAGS1) $^ $(DIST)/bin/icons
 endif
 
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 libs::
deleted file mode 100644
--- a/toolkit/mozapps/update/updater/gen_cert_header.py
+++ /dev/null
@@ -1,25 +0,0 @@
-import sys
-import binascii
-
-def file_byte_generator(filename, block_size = 512):
-  with open(filename, "rb") as f:
-    while True:
-      block = f.read(block_size)
-      if block:
-        for byte in block:
-          yield byte
-      else:
-        break
-
-def create_header(array_name, in_filename):
-  hexified = ["0x" + binascii.hexlify(byte) for byte in file_byte_generator(in_filename)]
-  print "const uint8_t " + array_name + "[] = {"
-  print ", ".join(hexified)
-  print "};"
-  return 0
-
-if __name__ == '__main__':
-  if len(sys.argv) < 3:
-    print 'ERROR: usage: gen_cert_header.py array_name in_filename'
-    sys.exit(1);
-  sys.exit(create_header(sys.argv[1], sys.argv[2]))
--- a/toolkit/mozapps/update/updater/moz.build
+++ b/toolkit/mozapps/update/updater/moz.build
@@ -104,11 +104,16 @@ DELAYLOAD_DLLS += [
     'wsock32.dll',
 ]
 
 if CONFIG['_MSC_VER']:
     WIN32_EXE_LDFLAGS += ['-ENTRY:wmainCRTStartup']
 elif CONFIG['OS_ARCH'] == 'WINNT':
     WIN32_EXE_LDFLAGS += ['-municode']
 
+if CONFIG['MOZ_UPDATE_CHANNEL'] in ('beta', 'release', 'esr'):
+    DEFINES['MAR_SIGNING_RELEASE_BETA'] = '1'
+elif CONFIG['MOZ_UPDATE_CHANNEL'] in ('nightly', 'aurora', 'nightly-elm', 'nightly-profiling', 'nightly-oak', 'nightly-ux'):
+    DEFINES['MAR_SIGNING_AURORA_NIGHTLY'] = '1'
+
 if CONFIG['MOZ_WIDGET_GTK']:
     CXXFLAGS += CONFIG['TK_CFLAGS']
     OS_LIBS += CONFIG['TK_LIBS']