|
| int | certbotbot_tar_block (String source, String offset) |
| | Loads exactly one 512-byte block from the decoded tar stream.
|
| |
| int | certbotbot_tar_octal (String start, String width) |
| | Parses one fixed-width header field as bounded ASCII octal.
|
| |
| int | certbotbot_tar_text (String start, String width) |
| | Reads a NUL-terminated printable ASCII header field.
|
| |
| int | certbotbot_tar_path (String path, String type) |
| | Enforces the canonical relative Certbot member-name subset.
|
| |
| int | certbotbot_tar_link (String path, String target) |
| | Checks the canonical live-to-archive Certbot PEM link relationship.
|
| |
| int | certbotbot_archive_validate (String archive) |
| | Checks bounded gzip/tar structure without extracting any data.
|
| |
Verifies bounded tar/gzip structure without extracting certificate data.
This pre-extraction format gate follows ADR-022. It reads raw 512-byte tar headers using GNU od and Bash 4.3, with no interpreted tar commands. The algorithm rejects unsupported extensions, unsafe paths and links, incomplete gzip streams, and inconsistent archive metadata. Successful format validation never authorizes account use or Certbot execution.
| int certbotbot_archive_validate |
( |
String |
archive | ) |
|
Checks bounded gzip/tar structure without extracting any data.
A fresh private temporary directory stores the decoded data (maximum 32 MiB), which is inspected at precise tar header offsets. File bodies are skipped according to their validated byte lengths. Unsafe metadata, extensions, duplicates, symlink targets and permissions fail closed. No host Certbot paths, AWS calls, or credential files are accessed here. Temporary decoded data is removed on success and on ordinary failures.
- Parameters
-
| archive | Readable, non-symlink local .tar.gz file. |
- STDIN
- Nothing is read from STDIN.
- STDOUT
- Nothing is written to STDOUT.
- STDERR
- Fixed safe diagnostics only.
- Returns
- Nothing is written to STDOUT.
- Return values
-
| 0 | Format preflight passed; account and renewal safety not verified. |
| 64 | Invalid archive argument. |
| 65 | Archive malformed, oversized or unsupported. |