|
certbotbot
Reference documentation for a modular Bash project
|
Validates a primary and additional DNS identities for one lineage. More...
Functions | |
| int | certbotbot_dns_valid (String name) |
| Validates canonical ASCII DNS names, optionally wildcard-prefixed. | |
| int | certbotbot_identity_shortest (String arg) |
| Chooses one safe, shortest textual Certbot lineage from canonical SANs. | |
| int | certbotbot_identity_resolve () |
| Computes the bounded multi-SAN set and stable lineage identifier. | |
Validates a primary and additional DNS identities for one lineage.
All explicit names are checked before calling external tools. Each primary and additional name gains its complementary apex/wildcard only when enabled; derived names never recurse. Global first-occurrence deduplication produces a bounded, ordered set, including DNS names from unrelated zones. Derived names and certificate identities remain deterministic across runners. Names from SANs are checked for safe non-wildcard lineage usage before S3 retrieval or issuance; lexical ties are resolved using ASCII ordering.
| int certbotbot_dns_valid | ( | String | name | ) |
Validates canonical ASCII DNS names, optionally wildcard-prefixed.
| name | Primary name or SAN. |
| 0 | The DNS name is valid. |
| 1 | The DNS name is invalid. |
| int certbotbot_identity_resolve | ( | ) |
Computes the bounded multi-SAN set and stable lineage identifier.
Accepts one primary and zero or more additional literal DNS identities, normalizes ASCII case, validates each name, and optionally adds each name's single complementary wildcard/apex. The resolved list preserves the first occurrence of each name and contains no more than 100 unique SANs. The explicit CERT_NAME is independent of SAN membership; absent an override, the existing shortest-string and ASCII lexical tie rule still applies.
| 0 | Selected identity is valid. |
| 64 | Identity or certificate name is invalid. |
| int certbotbot_identity_shortest | ( | String | arg | ) |
Chooses one safe, shortest textual Certbot lineage from canonical SANs.
Compares full SAN lengths, including the wildcard prefix, using an ASCII lexical tie-break independent of the invoking process's locale. This is an internal selector, not an additional-SAN public interface. It rejects a wildcard-only derived lineage instead of passing a wildcard to Certbot.
| arg | One or more canonical DNS SAN candidates. |
| 0 | A safe non-wildcard lineage was selected. |
| 1 | No candidates, malformed SAN, or derived wildcard lineage. |