bugfix imgtool verify()
@@ -116,12 +116,14 @@ def verify(key, imgfile):
return
elif ret == image.VerifyResult.INVALID_MAGIC:
print("Invalid image magic; is this an MCUboot image?")
- elif ret == image.VerifyResult.INVALID_MAGIC:
+ elif ret == image.VerifyResult.INVALID_TLV_INFO_MAGIC:
print("Invalid TLV info magic; is this an MCUboot image?")
elif ret == image.VerifyResult.INVALID_HASH:
print("Image has an invalid sha256 digest")
elif ret == image.VerifyResult.INVALID_SIGNATURE:
print("No signature found for the given key")
+ else:
+ print("Unknown return code: {}".format(ret))
sys.exit(1)
