Skip to content

Add NDNCERT CA server and include system CA roots in image - #231

Closed
markverick wants to merge 2 commits into
named-data:mainfrom
markverick:ndncert-ca-server
Closed

markverick wants to merge 2 commits into
named-data:mainfrom
markverick:ndncert-ca-server

Conversation

@markverick

Copy link
Copy Markdown
Collaborator

This pull request adds support for email and DNS-01 challenges to the NDNCERT CA server, enabling automated certificate issuance via email and DNS verification. It introduces robust implementations for both challenge types, comprehensive unit tests, and a sample configuration file. Additionally, it ensures that the Docker image includes system CA certificates for secure email delivery.

NDNCERT CA Challenge Support

Email Challenge Implementation:

  • Implements ChallengeEmailHandler and SMTPEmailSender in challenge_email.go, supporting secure code generation, email delivery via SMTP (with TLS), and robust validation of user input and code attempts.
  • Adds unit tests for the email challenge, covering normal flow, incorrect code attempts, invalid addresses, and SMTP failures in challenge_email_test.go.

DNS-01 Challenge Implementation:

  • Implements ChallengeDnsHandler in challenge_dns.go, allowing domain ownership verification via DNS TXT records, with support for test mocking and error handling.
  • Adds unit tests for the DNS challenge, including correct and incorrect flows, missing parameters, and DNS lookup failures in challenge_dns_test.go.

Configuration and Integration

  • Adds a sample CA configuration file (ca.conf.sample) demonstrating how to configure supported challenges, including SMTP details for email verification.
  • Updates the Dockerfile to include system CA certificates, ensuring that outgoing email via SMTP over TLS works correctly in production.

Testing and Policy Validation

  • Introduces a test file for CA policy and certificate request validation, ensuring correct CA behavior for certificate storage and request validation in ca_policy_test.go.

start := notBefore.Unwrap()
end := notAfter.Unwrap()
maxValiditySeconds, err := ca.config.GetMaxValidityPeriodSeconds()
maxValidity := time.Duration(maxValiditySeconds) * time.Second
@markverick markverick closed this Oct 20, 2026
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