Skip to content

Commit

Permalink
Merge branch 'master' into fix_sentinel_detection
Browse files Browse the repository at this point in the history
  • Loading branch information
deajan committed Jan 10, 2024
2 parents 763a103 + 99b838f commit 5531196
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions windows_tools/signtool/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@

__intname__ = "windows_tools.signtool"
__author__ = "Orsiris de Jong"
__copyright__ = "Copyright (C) 2020-2023 Orsiris de Jong"
__copyright__ = "Copyright (C) 2020-2024 Orsiris de Jong"
__description__ = "Windows authenticode signature tool"
__licence__ = "BSD 3 Clause"
__version__ = "0.4.0"
__build__ = "2023112601"
__version__ = "0.4.1"
__build__ = "2024011001"

import os

from typing import Optional, Union
from command_runner import command_runner
from ofunctions.file_utils import get_paths_recursive
from ofunctions.network import test_http_internet
from ofunctions.network import check_http_internet
from windows_tools.bitness import is_64bit, is_64bit_executable

# Basic PATHS where signtool.exe should reside when Windows SDK is installed
Expand Down Expand Up @@ -128,7 +128,7 @@ def get_timestamp_server(self):
"http://timestamp.globalsign.com/scripts/timstamp.dll",
]
for server in ts_servers:
if test_http_internet([server]):
if check_http_internet([server]):
self.authority_timestamp_url = server
return True
raise ValueError("No online timeserver found")
Expand All @@ -138,7 +138,7 @@ def sign(self, executable, bitness: Union[None, int, str] = None):
possible_bitness = is_64bit_executable(executable)
if possible_bitness is not None:
bitness = 64 if possible_bitness else 32
elif bitness in [32, "32", "x86"]:
if bitness in [32, "32", "x86"]:
signtool = os.environ.get("SIGNTOOL_X32", self.detect_signtool("x86"))
elif bitness in [64, "64", "x64"]:
signtool = os.environ.get("SIGNTOOL_X64", self.detect_signtool("x64"))
Expand Down
2 changes: 1 addition & 1 deletion windows_tools/signtool/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ ofunctions.network>=1.3.2
command_runner>=1.2.1
windows_tools.bitness>=0.2.0
ofunctions.file_utils
ofunctions.network
ofunctions.network>=1.6.0

0 comments on commit 5531196

Please sign in to comment.