Use SHA 256 with Authenticode

This commit is contained in:
Kovid Goyal 2015-12-31 14:50:42 +05:30
parent d1150b2887
commit 4772ea768b

View File

@ -555,16 +555,17 @@ class Win32Freeze(Command, WixMixIn):
'*.exe')) '*.exe'))
if not files: if not files:
raise ValueError('No installers found') raise ValueError('No installers found')
args = ['signtool.exe', 'sign', '/a', '/d', args = ['signtool.exe', 'sign', '/a', '/fd', 'sha256', '/td', 'sha256', '/d',
'calibre - E-book management', '/du', 'calibre - E-book management', '/du',
'http://calibre-ebook.com', '/t', 'http://calibre-ebook.com', '/tr']
'http://timestamp.verisign.com/scripts/timstamp.dll'] for timeserver in ('http://timestamp.geotrust.com/tsa', 'http://timestamp.comodoca.com/rfc3161',):
try: try:
subprocess.check_call(args + files) subprocess.check_call(args + [timeserver] + files)
except subprocess.CalledProcessError: break
print ('Signing failed, retrying with different timestamp server') except subprocess.CalledProcessError:
args[-1] = 'http://timestamp.comodoca.com/authenticode' print ('Signing failed, retrying with different timestamp server')
subprocess.check_call(args + files) else:
raise SystemExit('Signing failed')
def add_dir_to_zip(self, zf, path, prefix=''): def add_dir_to_zip(self, zf, path, prefix=''):
''' '''