Skip to content

Conversation

@bavshin-f5
Copy link
Member

This gets us fully compliant with the RFC, so we can mark it as supported.

This allows us to skip revalidation of UTF-8 identifier strings and
reallocation of the order object.

See also 511be2a.
@bavshin-f5 bavshin-f5 requested review from Copilot and xeioex November 5, 2025 20:31
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements full RFC 8738 compliance for ACME IP identifier support, enabling certificate requests using IPv4 and IPv6 addresses as identifiers instead of just domain names.

Key Changes:

  • Refactored identifier handling to use &'static str instead of ngx_str_t for improved type safety and canonical representation
  • Added IP address parsing and canonicalization logic to ensure RFC-compliant formatting
  • Added comprehensive test coverage for both IPv4 and IPv6 identifier validation

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
t/acme_ipv6_identifier.t New test suite validating IPv6 address identifier support via HTTP-01 and TLS-ALPN-01 challenges
t/acme_ipv4_identifier.t New test suite validating IPv4 address identifier support via HTTP-01 and TLS-ALPN-01 challenges
src/lib.rs Simplified certificate order processing by removing intermediate string conversion
src/conf/order.rs Major refactoring to handle IP identifiers with canonical formatting and improved validation
src/conf/issuer.rs Updated type signatures to use &'static str for certificate orders
src/conf/identifier.rs Removed unused as_str() method as part of refactoring
src/conf.rs Updated configuration parsing to convert values to static strings early and made conf_value_to_str public
README.md Updated documentation to note RFC 8738 support and provide examples of IP identifier usage
Comments suppressed due to low confidence (1)

t/acme_ipv6_identifier.t:1

  • Port 8080 should use an IPv6 address [::1] instead of 127.0.0.1 to match the IPv6 test context. This hardcoded IPv4 address is inconsistent with the IPv6-focused test and server configuration.
#!/usr/bin/perl

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@xeioex xeioex left a comment

Choose a reason for hiding this comment

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

Otherwise looks good.

As stated in RFC8738 § 3:

: The value field of the identifier MUST contain the textual form of the
: address as defined in Section 2.1 of [RFC1123] for IPv4 and in Section
: 4 of [RFC5952] for IPv6.

This is the last piece required before declaring RFC8738 support.

Fixes nginx#5.
@bavshin-f5 bavshin-f5 merged commit 4ae3078 into nginx:main Nov 6, 2025
20 checks passed
@bavshin-f5 bavshin-f5 deleted the 8738-ip-identifiers branch November 6, 2025 04:00
@bavshin-f5 bavshin-f5 added this to the 0.3.0 milestone Nov 12, 2025
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