Skip to content

script: reject malformed script integers, add tests - #549

Open
jgriffiths wants to merge 3 commits into
masterfrom
scriptint
Open

script: reject malformed script integers, add tests#549
jgriffiths wants to merge 3 commits into
masterfrom
scriptint

Conversation

@jgriffiths

Copy link
Copy Markdown
Contributor

No description provided.

jgriffiths and others added 3 commits September 4, 2026 12:03
The CMake config template spelled the SHA-256 define as
HAVE_MBEDTLS_SHA256_H_ (trailing underscore), so src/ccan_config.h never
selected the mbedtls backend under CMake and silently built the software
SHA-256 instead. The --enable-mbed-tls help string was a copy of the
--enable-minimal one.
The HMAC implementation used sizeof() of a hash context member to obtain
the block size and used that member as scratch space for the key block.
That ties HMAC to the context layout of whichever hashing backend is
selected, and is impossible for opaque backends such as PSA Crypto.

Use the block size constant of the hash (64 for SHA-256, 128 for
SHA-512) and a local key block instead. The byte operations are
unchanged for all backends.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants