Skip to content

docs: fix modutil/P11_KIT_SERVER_ADDRESS ordering in PKCS#11 guide#534

Open
joshdrake wants to merge 1 commit into
mainfrom
docs/pkcs11-modutil-order
Open

docs: fix modutil/P11_KIT_SERVER_ADDRESS ordering in PKCS#11 guide#534
joshdrake wants to merge 1 commit into
mainfrom
docs/pkcs11-modutil-order

Conversation

@joshdrake

Copy link
Copy Markdown
Contributor

Problem

The OpenSSL and PKCS#11 support section of the Smallstep Agent docs showed a broken command sequence: it ran modutil -add before exporting P11_KIT_SERVER_ADDRESS.

This fails. modutil loads and initializes the module as part of adding it, and p11-kit-client.so cannot initialize unless P11_KIT_SERVER_ADDRESS already points at the running agent's PKCS#11 socket. Run in the documented order, modutil errors out and can leave a broken module registered in ~/.pki/nssdb.

Changes

  • platform/smallstep-agent.mdx — Export P11_KIT_SERVER_ADDRESS before running modutil, and add a warning callout explaining the ordering requirement (with a deep link to the new recovery steps).
  • platform/troubleshooting-agent.mdx — Add a Recovering from a failed modutil add subsection: close the browser, list modules (modutil -list / certutil -d ~/.pki/nssdb -U), delete the broken module (modutil -delete step-agent), then re-export and re-add in the correct order.
  • .vale/styles/config/vocabularies/Smallstep/accept.txt — Accept certutil (matches how modutil is already whitelisted).

Verification

  • vale (repo config, excluding auto-generated step-cli/reference/**): the edits introduce no new lint errors.
  • New anchor #recovering-from-a-failed-modutil-add and reused #openssl-and-pkcs11-support follow the repo's slug convention.
  • Full end-to-end command testing requires a running agent exposing the PKCS#11 socket (not available in the docs environment); the command flow is verified against p11-kit/NSS behavior and a firsthand report of the failure.

🤖 Generated with Claude Code

The "OpenSSL and PKCS#11 support" example ran `modutil -add` before
exporting P11_KIT_SERVER_ADDRESS. That fails: modutil loads and
initializes the module as it adds it, and p11-kit-client.so cannot
initialize unless P11_KIT_SERVER_ADDRESS already points at the running
agent's PKCS#11 socket.

- smallstep-agent.mdx: export the env var before running modutil, and
  add a warning callout explaining the ordering requirement.
- troubleshooting-agent.mdx: add a "Recovering from a failed modutil
  add" subsection (list/delete the broken module with modutil/certutil,
  then re-add in the correct order).
- vale vocab: accept `certutil`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VBgyxA5TPfE3hZMyoL1T5r
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@joshdrake
joshdrake marked this pull request as ready for review July 21, 2026 15:26
@joshdrake
joshdrake requested a review from a team as a code owner July 21, 2026 15:26
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