Skip to content

Commit

Permalink
bugfix(espsecure): Print a clear error message if incompatible OpenSS…
Browse files Browse the repository at this point in the history
…L backend is used

Closes #878
  • Loading branch information
radimkarnis committed May 23, 2023
1 parent a7df5d3 commit 37efb1d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions espsecure/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1812,6 +1812,16 @@ def _main():
except esptool.FatalError as e:
print("\nA fatal error occurred: %s" % e)
sys.exit(2)
except ValueError as e:
try:
if [arg for arg in e.args if "Could not deserialize key data." in arg]:
print(
"Note: This error originates from the cryptography module. "
"It is likely not a problem with espsecure, "
"please make sure you are using a compatible OpenSSL backend."
)
finally:
raise


if __name__ == "__main__":
Expand Down

0 comments on commit 37efb1d

Please sign in to comment.