Account & configuration
xrtAcmeAccountConfigInit config
Zero-initialize the account config; assign the CA preset constants XACME_DIRECTORY_LE / LE_STAGING / ZEROSSL / GOOGLE / BUYPASS straight into sDirectoryUrl.
Issuance flow (5 entry points)
xacmeClientInit / Unit / AccountPem lifecycle
Build the client: parse the directory, register or reuse the account (kid comes from the Location header); AccountPem exports the account key for persistence. Failures set the thread error (domain "xrt.acme.flow").
xacmeClientIssue issue
One dns-01 issuance: domains may carry wildcards; returns the certificate chain PEM (free with xrtFree). The provider's Add runs before the challenge, Remove best-effort afterwards.
xacmeClientIssueStored one-stop renewal
Composed with the store: at ≥ iRenewalDays remaining, return the existing chain as-is (*pbRenewed=false); otherwise issue, persist (fullchain + CA provenance) and return the new chain.
DNS providers
xrtAcmeDnsProviderValidate / Count / Id interface
Provider struct validation and built-in registry enumeration (currently "ali" only); custom vendors plug in by filling the struct (id/Add/Remove/optional Propagate).
xrtAcmeDnsAliConfigInit / xrtAcmeDnsAli / ProviderUnit aliyun
Aliyun alidns provider construction (ACS3-HMAC-SHA256 V3 signing) and teardown; keys go through env/Custom.
The library carries its own TXT propagation probe (UDP to the authoritative NS) and only notifies the CA once the record is visible.
Storage & renewal
xrtAcmeStoreSaveAccount / LoadAccount account
Persist/reload the account key (PKCS#8 PEM) — pass it to Init for reuse, skipping re-registration.
xrtAcmeStoreSaveCert / LoadCert / LoadCertCa certificates
Store and read the full chain and CA provenance separately, written atomically.
xrtAcmeStoreNeedRenew renewal check
Decide by remaining days whether renewal is due (x509 parsing, no external process).