allow v2 signatures in restoration of backups

This commit is contained in:
bunnie 2024-01-08 16:21:09 +08:00
parent 3a108bb902
commit 43a1502de8

View file

@ -675,7 +675,7 @@ def main():
# first try the stable branch and see if it meets the version requirement
print("Downloading candidate restore kernel...")
candidate_kernel = requests.get(URL_LIST[attempt] + 'xous-' + language + '.img').content
if int.from_bytes(candidate_kernel[:4], 'little') != 1:
if int.from_bytes(candidate_kernel[:4], 'little') != 1 and int.from_bytes(candidate_kernel[:4], 'little') != 2:
print("Downloaded kernel image has unexpected signature version. Trying the next image.")
attempt += 1
continue