Skip to content

[CI validation] OpenSSL release-series matrix - #37

Closed
zandbelt wants to merge 4 commits into
masterfrom
ci-openssl-3.0
Closed

zandbelt wants to merge 4 commits into
masterfrom
ci-openssl-3.0

Conversation

@zandbelt

@zandbelt zandbelt commented Sep 11, 2026 •

Copy link
Copy Markdown
Member

Validation run inside the fork for a workflow change (a plain branch push no longer runs CI). Two commits:

  1. Restore the build against OpenSSL 1.1.0 and 1.1.1: master fails to compile against 1.1.x under OPENSSL_API_COMPAT=0x10100000L (EVP_CIPHER_CTX_init, missing <openssl/bn.h> in jws.c since Remove OpenSSL dependencies from public headers cisco/cjose#166, pre-1.1 init/cleanup calls in the test harness).
  2. A separate OpenSSL workflow that builds the last release of every series from 1.0.1 to 4.0 from source (sha256 pinned, cached) plus 3.0.7, checks with ldd that check_cjose loads that library, and runs the tests.

Expected: green on master for all 13 entries.

🤖 Generated with Claude Code

zandbelt and others added 2 commits September 11, 2026 12:26
_cjose_jws_build_dig_hmac_sha() handed jwk->keydata to HMAC_Init_ex()
as keysize/8 octets of key material for any key type; the key type was
only checked afterwards in _cjose_jws_build_sig_hmac_sha(). For an EC
or RSA key keydata is a (much smaller) key structure, so cjose_jws_sign()
with an HS256/HS384/HS512 header and such a key computed an HMAC over
the structure and past the end of its allocation before failing;
valgrind flags the over-read. The call did return CJOSE_ERR_INVALID_ARG,
so the visible behaviour does not change.

Reject a non-oct key up front, as the other digest and signing steps do
for their key types. The regression test signs with EC and RSA keys
under the three HS algorithms; it fails on master under valgrind.

Signed-off-by: Hans Zandbelt <hans.zandbelt@openidc.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
The build sets OPENSSL_API_COMPAT=0x10100000L. Under that level OpenSSL
1.1.x no longer provides the pre-1.1.0 compatibility names
EVP_CIPHER_CTX_init, ERR_load_crypto_strings, OpenSSL_add_all_algorithms,
EVP_cleanup and ERR_free_strings, which 1.0.x implements as functions
and 3.x still defines as macros, so the library and the test harness
failed to compile with implicit function declarations. jws.c also relied
on a transitive <openssl/bn.h> include that went away when the public
headers stopped including OpenSSL headers (cisco#166); 1.0.x and 3.x happen
to pull it in through <openssl/rsa.h>.

Drop the EVP_CIPHER_CTX_init calls, which are redundant right after
EVP_CIPHER_CTX_new on every release, include bn.h where the BIGNUM
functions are used, and confine the explicit initialisation and cleanup
in the test harness to OpenSSL before 1.1.0, which initialises itself.

README.md promises OpenSSL 1.0.1h or newer; the OpenSSL workflow that
follows builds against the last release of every series to keep it that
way.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Hans Zandbelt <hans.zandbelt@openidc.com>
@zandbelt zandbelt changed the title [CI validation] Build and test against OpenSSL 3.0.7 [CI validation] OpenSSL release-series matrix Sep 11, 2026
zandbelt and others added 2 commits September 11, 2026 12:46
The Build and Archs workflows test against the OpenSSL that the platform
packages provide, which is a recent release, so behaviour that only
differs in another release goes unnoticed, and README.md promises
OpenSSL 1.0.1h or newer. Add an OpenSSL workflow that builds the last
release of every series from 1.0.1 to 4.0 from the GitHub release
tarball (sha256 pinned, cached across runs), configures cjose with
OPENSSL_ROOT_DIR pointing at it, checks with ldd that check_cjose loads
that library rather than the system one, and runs the tests.

3.0.7 is in the matrix as well: it is the release RHEL 9 is based on and
the last 3.0.x whose EdDSA signing dereferences a missing private key
instead of failing; 3.0.8 added the guard.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Hans Zandbelt <hans.zandbelt@openidc.com>
actions/cache@v4 targets Node.js 20, which GitHub has deprecated on its
runners: every run carries a "Node.js 20 is deprecated ... forced to
run on Node.js 24: actions/cache@v4" annotation. v5 moved the action to
Node.js 24 with unchanged inputs and v6 is the current major.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Hans Zandbelt <hans.zandbelt@openidc.com>
@zandbelt

Copy link
Copy Markdown
Member Author

Validation done: opened upstream as cisco#170 (all 13 matrix entries green here).

@zandbelt zandbelt closed this Sep 11, 2026
@zandbelt
zandbelt deleted the ci-openssl-3.0 branch September 12, 2026 05:42
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.

1 participant