Skip to content

Doc fixes and proper agents files - #48

Merged
yosuke-wolfssl merged 3 commits into
wolfSSL:mainfrom
Frauschi:docs-stale-claims
Oct 7, 2026
Merged

yosuke-wolfssl merged 3 commits into
wolfSSL:mainfrom
Frauschi:docs-stale-claims

Conversation

@Frauschi

@Frauschi Frauschi commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Problem

  • Stale interop section: the README said the interop scripts are run by hand and that wolfSSL rejects micromdm's and step-ca's SCEP ("stricter PKCS#7 verification", "EnvelopedData key-wrap algorithm"). The nightly Interop workflow runs them, and every peer passes. The old step-ca failure was BAD_KEYWRAP_ALG_E from its default ECDSA RA, not a key-wrap algorithm wolfSSL refuses.
  • Non-existent CryptoCb API: docs/ARCHITECTURE.md sections 4.2 and 4.7 and CLAUDE.md told integrators to call wolfCrypt_CryptoCb_RegisterDevice, which does not exist.
  • Wrong SCEP routing claim: docs/ARCHITECTURE.md section 2 said wolfcert_client_enroll / _reenroll route to EST or SCEP, and wolfcert/client.h said wolfcert_client_fetch_meta queries SCEP capabilities. Only wolfcert_client_get_ca handles SCEP; the others return WOLFCERT_ERR_UNSUPPORTED for it.
  • Wrong verify_server comment: wolfcert/types.h described verify_server 0 as an explicit-trust-anchor bootstrap. EST refuses it on every call, /cacerts included, and SCEP refuses it on an https:// URL, both with WOLFCERT_ERR_TLS.
  • CLAUDE.md written for the wrong reader: it covered the dev build, ctest, internal error macros, symbol visibility and license headers, which help someone working on wolfCert but not an agent helping a user build wolfCert into a product. Agents other than Claude Code also look for AGENTS.md, not CLAUDE.md.
  • Docs missing from make dist: EXTRA_DIST listed only README.md, docs/ARCHITECTURE.md and docs/EMBEDDED.md, so the tarball lacked docs/INTEROP.md, docs/CI.md, docs/MIGRATING-FROM-WOLFSCEP.md and the agent files that the other docs point at.
  • No tracked contributor guide: once CLAUDE.md moved to integrators, the wolfCert-specific rules (error macros, visibility, license header, include order, the Zephyr board checklist) had no tracked home.

Fix

  • Correct stale interop and client API claims in the docs: the README interop section now says the nightly workflow runs every peer and all of them pass. It keeps the caveats that still apply: micromdm needs --enable-des3, step-ca's SCEP needs an RSA CA chain, and open-source step-ca has no EST. It also points at docs/INTEROP.md, whose introduction no longer calls the scripts hand-run. The CryptoCb call is renamed to wc_CryptoCb_RegisterDevice, and ARCHITECTURE and client.h say which wolfcert_client_* calls are EST-only. The verify_server field comment says it must be 1 for EST and https:// SCEP. EXTRA_DIST now ships the three missing docs/ files. Only header comments change; no code.

  • Turn CLAUDE.md into an integrator-focused AGENTS.md: follows wolfSSL's split. AGENTS.md is written for integrators:

    • choosing an integration path
    • the wolfSSL features wolfCert needs and the canonical configure line
    • CMake and autoconf options side by side
    • the configuration model, and when to pick EST or SCEP
    • a minimal enrollment flow
    • the public headers and porting hooks
    • checking an integration against wolfcert-server
    • gotchas

    CLAUDE.md becomes @AGENTS.md. .gitignore lists the untracked AGENTS.local.md / CLAUDE.local.md for machine-specific notes. docs/EMBEDDED.md and scripts/ci/build-wolfssl.sh now point at AGENTS.md, and EXTRA_DIST ships AGENTS.md and CLAUDE.md.

  • Add CONTRIBUTING.md: wolfSSL's shared contributor guide, without the Jenkins and wolfSSL-Bot paragraphs since wolfCert's CI is GitHub Actions only, plus a "wolfCert Specifics" section with the project rules and the full Zephyr board checklist. AGENTS.md points contributors at it.

Notes for reviewers

  • ARCHITECTURE section 4.2 still says TLS client auth and SCEP pkiMessage signing go through the CryptoCb dev_id. Today they export the private key instead (wolfSSL_CTX_use_PrivateKey_buffer in src/http.c, wolfcert_key_to_pem in EST reenroll, rsa_key_to_der in the SCEP client). A follow-up PR fixes the code to match, so this PR leaves that paragraph alone.

Tests

  • Docs only, apart from two comment blocks in wolfcert/client.h and one field comment in wolfcert/types.h. A -DWOLFCERT_WERROR=ON build against wolfSSL 5.9.4 has no warnings, and ctest passes 30/30. make dist ships every Markdown file the other docs reference, apart from the gitignored *.local.md files and examples/certs/README.md (the tarball has never included examples/certs/).
  • The verify_server wording was checked by running with verify_server = 0: EST get_ca and SCEP GetCACert over https:// return WOLFCERT_ERR_TLS (-5) before connecting, and SCEP over http:// passes the check.
  • The enrollment snippet in AGENTS.md was compiled as written and run against a local wolfcert-server --proto est. It enrolls, and fails with ASN_NO_SIGNER_E (-188) when given the wrong trust anchor.

@Frauschi Frauschi self-assigned this Oct 6, 2026
Copilot AI balanced review requested due to automatic review settings October 6, 2026 09:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The new integration guide contains inaccurate transport, CryptoCb, and asynchronous-session guidance.

Review effort: Balanced
Findings: 1 Low severity

Open (1)
What changed in this PR

Updates integration guidance and corrects stale protocol, interoperability, and CryptoCb documentation.

Changes:

  • Adds an integrator-focused AGENTS.md and redirects Claude guidance to it.
  • Corrects EST/SCEP API, TLS verification, and interoperability descriptions.
  • Updates related references and ignores local agent instruction files.
File Description
.gitignore Ignores local agent instructions.
AGENTS.md Adds the integration guide.
CLAUDE.md Redirects to AGENTS.md.
README.md Updates interoperability status.
docs/​ARCHITECTURE.md Corrects API routing and CryptoCb naming.
docs/​EMBEDDED.md Updates guide references.
scripts/​ci/​build-wolfssl.sh Updates the canonical guide reference.
wolfcert/​client.h Clarifies EST-only client operations.
wolfcert/​types.h Clarifies server-verification requirements.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread AGENTS.md Outdated
@Frauschi Frauschi assigned wolfSSL-Bot and unassigned Frauschi Oct 6, 2026

@yosuke-wolfssl yosuke-wolfssl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The corrected claims all check out against the code. I verified the verify_server checks, the client-API routing, the ECC RA rejection and every API name in the AGENTS.md example.

A few things below:

  • CONTRIBUTING.md: this follows wolfSSL's AGENTS.md / CLAUDE.md split, but wolfSSL pairs it with a tracked CONTRIBUTING.md, and wolfCert has none. The wolfCert-specific rules the old CLAUDE.md held now have no tracked home:

    • the WOLFCERT_ERR / WOLFCERT_ERR_WC macros, and wolfcert_strerror covering every code
    • WOLFCERT_TEST_VIS and the hidden-visibility rule
    • the license-header rule and include order
    • the Zephyr board checklist (sample.yaml, zephyr/include.am, the CI job, the README tables); zephyr/README.md "Adding a board" covers only the board files

    If you've already decided these belong in *.local.md, ignore this. Otherwise a CONTRIBUTING.md (wolfSSL's text plus a wolfCert section) would keep them visible to other contributors and review agents.

  • EXTRA_DIST: Makefile.am doesn't list AGENTS.md or docs/INTEROP.md, but docs/EMBEDDED.md and README.md now point at them, so a make dist tarball has dangling references.

  • docs/INTEROP.md:3 still calls the scripts "hand-run and best-effort", which no longer matches the new README text.

The README's Interoperability section still said the interop scripts are
run by hand and that wolfSSL rejects micromdm's and step-ca's SCEP. The
nightly Interop workflow runs them, and every peer passes: micromdm in
both directions on a wolfSSL built with --enable-des3, and step-ca SCEP
once its CA chain is RSA. The old step-ca failure was BAD_KEYWRAP_ALG_E
from its default ECDSA RA, not a key-wrap algorithm wolfSSL refuses. The
section now lists the caveats that still apply and points at
docs/INTEROP.md, whose introduction also called the scripts hand-run.

docs/ARCHITECTURE.md and CLAUDE.md named the CryptoCb registration call
wolfCrypt_CryptoCb_RegisterDevice, which does not exist; it is
wc_CryptoCb_RegisterDevice.

ARCHITECTURE.md said wolfcert_client_enroll and _reenroll route to EST or
SCEP, and client.h said fetch_meta queries SCEP capabilities. Only
wolfcert_client_get_ca handles SCEP; fetch_meta, enroll and reenroll
return WOLFCERT_ERR_UNSUPPORTED for it.

wolfcert/types.h described verify_server 0 as an explicit-trust-anchor
bootstrap. EST refuses it on every call and SCEP refuses it on an https://
URL, so the field has to be 1 wherever TLS is in use.

EXTRA_DIST left out docs/CI.md, docs/INTEROP.md and
docs/MIGRATING-FROM-WOLFSCEP.md, so a make dist tarball lacked files the
README and the other docs point at.
CLAUDE.md was written for people working on wolfCert itself: the dev
build, ctest, internal error macros, symbol visibility, license headers,
the steps for adding a key algorithm or a Zephyr board. An agent helping
someone build wolfCert into a product needs something else, and other
agents than Claude Code read AGENTS.md rather than CLAUDE.md.

AGENTS.md now follows the layout of wolfSSL's: which integration path to
pick, the wolfSSL features wolfCert requires and the canonical configure
line, building and installing with the CMake and autoconf options side by
side, the configuration model, when to pick EST or SCEP, a minimal
enrollment flow, the public headers, the porting hooks (heap hints,
transport, store, CryptoCb dev_id, non-blocking sessions, logging),
checking an integration against wolfcert-server, and the gotchas,
including that verify_server must be set to 1, since EST and HTTPS SCEP
refuse a zero-initialized config. CLAUDE.md is reduced to an import of
AGENTS.md.

Contributor notes move to AGENTS.local.md / CLAUDE.local.md, which
.gitignore now lists, as wolfSSL does. docs/EMBEDDED.md and
scripts/ci/build-wolfssl.sh pointed at CLAUDE.md for the build
requirements and key algorithm gating and now point at AGENTS.md.
EXTRA_DIST now ships AGENTS.md and CLAUDE.md.
@Frauschi

Frauschi commented Oct 7, 2026

Copy link
Copy Markdown
Member Author

Thanks, all three addressed:

  • Added CONTRIBUTING.md as a new commit: wolfSSL's shared guide without the Jenkins part, plus a wolfCert section with the rules you listed and the full Zephyr board checklist. AGENTS.md points at it.
  • EXTRA_DIST now ships AGENTS.md, CLAUDE.md, CONTRIBUTING.md and every file in docs/ (CI.md and MIGRATING-FROM-WOLFSCEP.md were missing too).
  • Reworded the docs/INTEROP.md intro.

@Frauschi Frauschi assigned yosuke-wolfssl and unassigned Frauschi Oct 7, 2026

@yosuke-wolfssl yosuke-wolfssl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, CONTRIBUTING.md reads well and the wolfCert section matches the tree.

One thing: two of the shared "What We Look For" rules don't match wolfCert's code:

  • C90 declarations / no for (int i = 0; ...): wolfCert builds as C11 (CMAKE_C_STANDARD 11), and src/ has about 29 for (size_t i = 0; ...) loops.
  • 80 columns, checked in CI: 448 lines in src/, wolfcert/ and cli/ are over 80 columns, and the Lint workflow doesn't check line length.

Maybe we can take it as follow-up or tailor the rules for wolfCert a bit.

The previous commit moved the contributor rules CLAUDE.md held (error
macros, symbol visibility, license headers, include order, the Zephyr
board checklist) into untracked local files, which left other
contributors and review agents without them.

CONTRIBUTING.md starts from the guide shared across the wolfSSL
repositories, without the Jenkins and wolfSSL-Bot paragraphs, since
wolfCert's CI runs only on GitHub Actions. Its declaration and line-
length rules are relaxed to match wolfCert, which builds as C11 and does
not check line length in CI, and two rules on keeping comments short are
added. A wolfCert section after it carries the project rules and the
full checklist for adding a board to the Zephyr EST sample. AGENTS.md
points contributors at it, and EXTRA_DIST ships it.
@Frauschi

Frauschi commented Oct 7, 2026

Copy link
Copy Markdown
Member Author

Thanks. Tailored both: the declarations bullet now says C11 and follow the file's style, and 80 columns is a soft target for new code that CI doesn't check. Also added two bullets on comment style.

@yosuke-wolfssl
yosuke-wolfssl merged commit 7946243 into wolfSSL:main Oct 7, 2026
28 checks passed
@Frauschi
Frauschi deleted the docs-stale-claims branch October 7, 2026 07:23
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.

4 participants