Skip to content

Commit

Permalink
Merge pull request #535 from tlsfuzzer/more-errors-on-import-mlkem
Browse files Browse the repository at this point in the history
fail kyber_py import because of SyntaxError too
  • Loading branch information
tomato42 authored Dec 17, 2024
2 parents 412a531 + 7ec0788 commit ae03030
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tlslite/utils/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,5 +244,9 @@ def byte_length(val):
del ML_KEM_1024
except ImportError:
ML_KEM_AVAILABLE = False
except SyntaxError:
# trying to import it on older Python versions causes it to abort with
# SyntaxError not ImportError
ML_KEM_AVAILABLE = False
else:
ML_KEM_AVAILABLE = True

0 comments on commit ae03030

Please sign in to comment.