test: fix expired attribute certificate test vector - #498
Open
yosuke-wolfssl wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the attribute-certificate (AC) test vectors so the wolfHSM test suite remains valid after wolfSSL started enforcing AC validity period checks during verification.
Changes:
- Regenerates the AC/CA/dummy cert vectors with ~30-year lifetimes to prevent test vectors from expiring.
- Updates
gen_acerts.shdocumentation to explain why long lifetimes are required and fixes the script provenance string embedded in the generated header. - Renames the generated header’s include guard to match the filename-derived convention used by the generator.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tools/testcertgen/gen_acerts.sh | Extends generated cert lifetimes and updates generator comments/provenance for AC test vectors. |
| test/wh_test_cert_data_acert.h | Replaces expired AC vector set with newly generated long-lived vectors and updates include guard/provenance. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
yosuke-wolfssl
force-pushed
the
fix/acert
branch
from
July 28, 2026 02:59
299f78a to
e6e88f6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
wolfHSM CI checks out wolfSSL
masterunpinned. wolfSSL merged attributecertificate validity-period enforcement (
9c5436b85, 2026-07-28 01:31 UTC),which adds
CheckDate()onnotBefore/notAfterinsideVerifyX509Acert():The committed test vector
attrCert_der[]was generated with a 48-hourlifetime and is valid only
20250404195725Z→20250406195725Z— expiredsince April 2025. It passed until now only because
VerifyX509Acert()neverchecked dates. Result:
Build and Test,Build and Test Client-Only, andCode Coveragefail on every config, onmainand every open PR, attest/wh_test_cert.c:1541.Fix (
test/wh_test_cert_data_acert.h)Regenerated the vector set with
tools/testcertgen/gen_acerts.sh(strongSwan
pki), with lifetimes raised so the vector does not re-expire:pki --self --ca365010950pki --issue36510950pki --acert48262800New acert validity is
20260728023203Z→20560720023203Z. Array names areunchanged, so no test source needed editing — the test now exercises the real
date check instead of skipping it. The script's stale
generate_certs.shprovenance string was corrected at the same time.The CA private key is not committed and the dates live inside the signed
ACINFO, so the whole set must be regenerated together; the script alreadydoes that.
Verification
Built against wolfSSL
9c5436b85— the exact merge that broke CI.ERROR [whTest_CertClientAcert:1541], reproducing CI exactly.make && make run→rc=0, no errors.DMA=1:rc=0(covers the second assertion atwh_test_cert.c:1846).CLIENT_ONLY=1 SHE=1against the POSIX server over TCP →rc=0.