Setup: update cert signing process (#5161)

This commit is contained in:
Fabian Dill
2025-08-01 00:43:43 +02:00
committed by GitHub
parent 8c07a2c930
commit e7131eddc2

View File

@@ -9,6 +9,7 @@ import subprocess
import sys import sys
import sysconfig import sysconfig
import threading import threading
import urllib.error
import urllib.request import urllib.request
import warnings import warnings
import zipfile import zipfile
@@ -144,15 +145,16 @@ def download_SNI() -> None:
print(f"No SNI found for system spec {platform_name} {machine_name}") print(f"No SNI found for system spec {platform_name} {machine_name}")
signtool: str | None signtool: str | None = None
if os.path.exists("X:/pw.txt"): try:
print("Using signtool") with urllib.request.urlopen('http://192.168.206.4:12345/connector/status') as response:
with open("X:/pw.txt", encoding="utf-8-sig") as f: html = response.read()
pw = f.read() if b"status=OK\n" in html:
signtool = r'signtool sign /f X:/_SITS_Zertifikat_.pfx /p "' + pw + \ signtool = (r'signtool sign /sha1 6df76fe776b82869a5693ddcb1b04589cffa6faf /fd sha256 /td sha256 '
r'" /fd sha256 /td sha256 /tr http://timestamp.digicert.com/ ' r'/tr http://timestamp.digicert.com/ ')
else: print("Using signtool")
signtool = None except (ConnectionError, TimeoutError, urllib.error.URLError) as e:
pass
build_platform = sysconfig.get_platform() build_platform = sysconfig.get_platform()