From 7e28b9c565ebfeb7ce829a1cf607213f738df07e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Fri, 13 Feb 2009 20:51:48 +0000 Subject: [PATCH] Add optional code signing after merging. --- Tools/msi/merge.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Tools/msi/merge.py b/Tools/msi/merge.py index 959978be44b..def39647990 100644 --- a/Tools/msi/merge.py +++ b/Tools/msi/merge.py @@ -1,5 +1,6 @@ import msilib,os,win32com,tempfile,sys PCBUILD="PCBuild" +certname = None from config import * Win64 = "amd64" in PCBUILD @@ -76,3 +77,8 @@ def merge(msi, feature, rootdir, modules): db.Commit() merge(msi, "SharedCRT", "TARGETDIR", modules) + +# certname (from config.py) should be (a substring of) +# the certificate subject, e.g. "Python Software Foundation" +if certname: + os.system('signtool sign /n "%s" /t http://timestamp.verisign.com/scripts/timestamp.dll %s' % (certname, msi))