Skip to content

Conversation

@Dexus
Copy link
Owner

@Dexus Dexus commented Oct 26, 2025

This pull request introduces a new Certificate Authority (CA) helper to the library, enabling users to issue certificates using an existing CA key and certificate without manually rebuilding the PKI state. It adds a new CA class, integrates it into the main module, documents its usage, and provides comprehensive tests for its functionality.

Certificate Authority Helper:

  • Added a new CertificateAuthority class in lib/ca.js that allows issuing certificates using an existing CA key, certificate, and optional chain. This class handles CSR creation, certificate signing, serial number formatting, and validity window resolution.
  • Exposed the new CA helper as pem.CA in the main module (lib/pem.js).

Documentation:

  • Updated README.md with a new section describing how to use the CA helper to issue certificates, including usage examples and option descriptions.

Testing:

  • Added a dedicated test suite in test/ca.spec.js to verify the CA helper's functionality, including default validity, custom validity windows, intermediate chain support, and error handling for invalid date ranges.## Summary
  • document how to issue certificates with the new CertificateAuthority helper in README

Testing

  • npm run lint -- --no-fix
  • npm run coverage

https://chatgpt.com/codex/tasks/task_e_68fe7439e11c832eb03bd921e66ec684

@Dexus Dexus changed the title Document certificate authority helper Certificate Authority Helper Oct 26, 2025
@Dexus Dexus merged commit 0880470 into master Oct 26, 2025
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants