certbotbot
Reference documentation for a modular Bash project
Loading...
Searching...
No Matches
Functions
renewal.bash File Reference

Maps selected Certbot renewal paths between canonical and private roots. More...

Functions

int certbotbot_renewal_map (String config, String name, String direction)
 Maps a complete selected lineage's renewal paths atomically.
 

Detailed Description

Maps selected Certbot renewal paths between canonical and private roots.

Implements the approved reversible path policy under ADR-022. Only the exact five documented path-bearing keys are changed, and unsupported Certbot metadata fails closed without partially rewriting the file.

Function Documentation

◆ certbotbot_renewal_map()

int certbotbot_renewal_map ( String  config,
String  name,
String  direction 
)

Maps a complete selected lineage's renewal paths atomically.

Requires a restored private configuration passing the local ACME state preflight, and a regular private renewal file for the selected name. prepare converts canonical /etc/letsencrypt paths into the private root; finalize performs exactly the inverse for five durable path fields. Certbot 5.8 can save explicit invocation-private config_dir, work_dir, and logs_dir fields in renewalparams. Under ADR-051, only finalize may omit those fields, and only if each equals the exact current workspace path. prepare and read-only verify reject the three ephemeral fields in archives. The entire input is parsed before a same-directory replacement, so validation failures preserve the original bytes. The exact Certbot pref_challs one-element value dns-01, is accepted under ADR-052; alternate/multiple challenge identities remain forbidden. Other Route53 metadata remains narrowly allowlisted. No account, host, PEM, or S3 data is mutated.

Parameters
configAbsolute canonical owned mode-0700 config directory.
nameValidated single non-wildcard certificate lineage name.
directionprepare, finalize, or read-only verify.
STDIN
Nothing is read from STDIN.
STDOUT
Nothing is written to STDOUT.
STDERR
Fixed diagnostics; configuration data is never printed.
Returns
Nothing is written to STDOUT.
Return values
0Paths mapped or canonical metadata verified, as requested.
64Invalid caller arguments or unsafe config root.
65Unexpected, incomplete, or unsafe renewal metadata.
74Failure writing a private replacement file.
Note
Actual Certbot compatibility and remote ACME account suitability are separate gates, and this function does not authorize issuance.