Commit Graph

5 Commits (2c35de76c7d9e7d1d7e393fddf5febfe653b221e)

Author SHA1 Message Date
Robert de Vries 2c35de76c7 Revert to actions/*v3 2026-07-06 22:29:31 +02:00
Robert de Vries 5126115d38 Fixed github actions document and processed review comments. 2026-07-06 22:29:31 +02:00
Robert de Vries 3078cd5b69 Change workflow to using uv and ruff.
uv is used to manage virtual environments and building wheels and
source distributions.
This replaces tox.
ruff is used to do static checking.
README is updated to reflect this change.
2026-07-06 22:29:31 +02:00
Andrew Hutchings ce93174570 Fix Random.__init__ AttributeError on builds without ML-KEM/ML-DSA
Random.__init__ used _lib.INVALID_DEVID as a default parameter value,
but INVALID_DEVID is only declared in the CFFI cdef inside
`if features["ML_KEM"] or features["ML_DSA"]`. Since default parameters
are evaluated at module import time, any wolfSSL build that lacks both
ML-KEM and ML-DSA (e.g. via USE_LOCAL_WOLFSSL pointing at a custom
build) raises AttributeError on `import wolfcrypt.random`, cascading
into wolfcrypt.ciphers and effectively breaking the entire library.

Hardcode the default to -2, matching the convention already used by
_Hmac._init and AesGcmStream.__init__ (which call wc_HmacInit /
wc_AesInit with -2 directly rather than referencing _lib.INVALID_DEVID).

Add a build-no-pqc GitHub Actions job that builds wolfSSL with
--disable-kyber --disable-dilithium, installs wolfcrypt-py against it
via USE_LOCAL_WOLFSSL, and runs an import-smoke step plus the full
pytest suite. The smoke step is the explicit regression guard: it
imports wolfcrypt.random and instantiates Random(), which would fail
at import time if the default ever again references a CFFI symbol that
is only conditionally declared.

F-2659
2026-05-11 12:02:26 +01:00
Andrew Hutchings 6b02e7e5a8 Create python-app.yml 2022-07-13 16:10:06 +02:00