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

Safely registers one Let's Encrypt account into one S3 archive. More...

Functions

int certbotbot_register_fetch (String workspace)
 Stages an existing ETag-bound S3 object or confirms its absence.
 
int certbotbot_register_account_check (String config)
 Requires one recognized private Certbot account with matching email.
 
int certbotbot_register_preflight (String config)
 Distinguishes a safe existing account from an accountless archive.
 
int certbotbot_register_package (String workspace)
 Serializes registered account state into the supported gzip tar.
 
int certbotbot_register_execute ()
 Registers or reuses one account and conditionally persists its state.
 
int certbotbot_register_main (String arg)
 Dispatches explicit registration without ordinary issuance.
 

Detailed Description

Safely registers one Let's Encrypt account into one S3 archive.

This registration-only workflow follows ADR-041. Ordinary issue/renew never invoke these functions. Private native Certbot account bytes are validated before a conditional single-object S3 write. The separate ordinary selected-lineage packaging and publishing gates are unchanged.

Function Documentation

◆ certbotbot_register_account_check()

int certbotbot_register_account_check ( String  config)

Requires one recognized private Certbot account with matching email.

Competing account IDs, foreign endpoint directories, unsafe metadata, and mismatched contact addresses fail before publication. Installed Certbot is the authoritative local parser for its native account files; the bounded literal contact check is not a general-purpose JSON parser.

Parameters
configIsolated private Certbot configuration directory.
STDIN
Nothing is read from STDIN.
STDOUT
Nothing is written to STDOUT.
Return values
0One recognized account matches the selected CA and contact.
65Missing, conflicting, or invalid account state.

◆ certbotbot_register_execute()

int certbotbot_register_execute ( )

Registers or reuses one account and conditionally persists its state.

Existing matching accounts never trigger a remote write. New accounts must pass all local validators before conditional first-write or update. Failed S3 PUT results are uncertain and never reported as success.

STDIN
Nothing is read from STDIN.
STDOUT
Fixed nonsecret result status.
Return values
0Account reused or newly published.
65Unsafe account or archive state.
69Missing provider or ambiguous read.
74Certbot, local staging or S3 transfer failure.

◆ certbotbot_register_fetch()

int certbotbot_register_fetch ( String  workspace)

Stages an existing ETag-bound S3 object or confirms its absence.

A 404 is accepted only after successful HeadBucket confirmation. A matched GetObject binds downloaded bytes to the ETag later passed to the conditional update. External diagnostics are discarded, not replayed.

Parameters
workspaceFresh private workspace owned by the caller.
STDIN
Nothing is read from STDIN.
STDOUT
Nothing is written to STDOUT.
Return values
0Existing object staged or confirmed absent.
69AWS unavailable, invalid ETag, or ambiguous S3 read.
74Download or private staging failed.

◆ certbotbot_register_main()

int certbotbot_register_main ( String  arg)

Dispatches explicit registration without ordinary issuance.

Parameters
argRegistration-only options.
STDIN
Nothing is read from STDIN.
STDOUT
Usage or result status.
Return values
0Successful operation.
64Invalid invocation.
Note
Other failure codes propagate from the registration stages.

◆ certbotbot_register_package()

int certbotbot_register_package ( String  workspace)

Serializes registered account state into the supported gzip tar.

This registration-only packager does not weaken the selected certificate prerequisite of the ordinary issuer's separate archive packager.

Parameters
workspacePrivate workspace containing config and newly registered account.
STDIN
Nothing is read from STDIN.
STDOUT
Nothing is written to STDOUT.
Return values
0Candidate passed the normal archive format gate.
65Unsafe account state or candidate.
74Local archive serialization unavailable.

◆ certbotbot_register_preflight()

int certbotbot_register_preflight ( String  config)

Distinguishes a safe existing account from an accountless archive.

Certbot's ordinary renewal parser is production-bound. Production account archives may preserve multiple complete and canonical lineages. Staging archives with renewal state are refused until separate issuer CA governance. A missing account with any lineage is never auto-associated with a new one.

Parameters
configPrivate configuration directory.
STDIN
Nothing is read from STDIN.
STDOUT
Nothing is written to STDOUT.
Return values
0Safe archive and classified registration presence.
65Unsafe or unsupported account or certificate state.