45#if SHARKSSL_PSA_CONSUMER
49#ifndef SHARKTRUSTX_PSA_KEY_BASE
50#define SHARKTRUSTX_PSA_KEY_BASE 0x23545800
52#if SHARKTRUSTX_PSA_KEY_BASE < 1 || SHARKTRUSTX_PSA_KEY_BASE > 0x3ffffffd
53#error SharkTrustX requires three application PSA key IDs
112 size_t messageLen,
unsigned char proof[32]);
struct SharkTrustX_Status SharkTrustX_Status
Snapshot of the certificate currently served by the managed listeners.
int(* SharkTrustX_Proof)(const unsigned char *message, size_t messageLen, unsigned char proof[32])
Compute the portal proof using generated tokengen code.
Definition: SharkTrustX.h:111
struct SharkTrustX_Config SharkTrustX_Config
Required integration objects and provisioning information.
void(* SharkTrustX_Event)(void *context, int code)
Receive one numeric event.
Definition: SharkTrustX.h:122
BA_API int SharkTrustX_setIpAddress(const char *address)
Ask the active client to publish a changed local IPv4 address.
BA_API BaBool SharkTrustX_getStatus(SharkTrustX_Status *status)
Copy current certificate status without network or storage operations.
SharkTrustX_Code
Numeric lifecycle notifications and errors.
Definition: SharkTrustX.h:92
@ SharkTrustX_Storage
Cannot read, commit, or clean local state.
Definition: SharkTrustX.h:97
@ SharkTrustX_Retry
A retry follows the preceding negative event.
Definition: SharkTrustX.h:94
@ SharkTrustX_Identity
Saved identity, name, or provider mismatch.
Definition: SharkTrustX.h:96
@ SharkTrustX_Acme
ACME account, order, or authorization failure.
Definition: SharkTrustX.h:99
@ SharkTrustX_Crypto
Allocation, key, signing, or listener failure.
Definition: SharkTrustX.h:101
@ SharkTrustX_Busy
A client or cleanup already owns the lifecycle.
Definition: SharkTrustX.h:95
@ SharkTrustX_Terms
Public CA terms were not accepted.
Definition: SharkTrustX.h:102
@ SharkTrustX_Portal
Invalid configuration or portal/DNS failure.
Definition: SharkTrustX.h:98
@ SharkTrustX_Ready
Usable certificate installed; renewal scheduled.
Definition: SharkTrustX.h:93
@ SharkTrustX_Trust
HTTPS peer did not pass trust/name/date checks.
Definition: SharkTrustX.h:100
BA_API int SharkTrustX_start(const SharkTrustX_Config *config)
Start registration, certificate installation, and automatic renewal.
void(* SharkTrustX_Name)(void *context, const char *name, size_t length)
Receive the portal-confirmed DNS name, independently of HTTPS readiness.
Definition: SharkTrustX.h:132
BA_API int SharkTrustX_clean(IoIntf *io, BaBool all, SharkTrustX_Event onClean, void *context)
Stop work, close the managed listener, and erase owned certificate state.
uint16_t U16
Unsigned 16-bit integer.
Definition: GenPrimT.h:94
S64 BaTime
An arithmetic type representing calendar time with epoch of 1970-01-01 00:00:00 UTC,...
Definition: GenPrimT.h:106
U8 BaBool
Boolean stored in an unsigned byte; FALSE is zero and TRUE is one.
Definition: GenPrimT.h:121
Timer manager used for one-shot and periodic callbacks.
Definition: BaTimer.h:67
Route and process HTTP requests using a borrowed dispatcher.
Definition: HttpServer.h:3463
The IoIntf class specifies an abstract file API, implementations include ZipIo, DiskIo,...
Definition: IoIntf.h:482
Required integration objects and provisioning information.
Definition: SharkTrustX.h:140
const char * name
Preferred hostname label, 1..63 ASCII letters/digits/hyphens; no leading/trailing hyphen.
Definition: SharkTrustX.h:148
U16 port
Required unused HTTPS port, 1..65535, normally 443.
Definition: SharkTrustX.h:160
const char * interfaceName
Optional bind address passed to both listener attempts; NULL selects all interfaces.
Definition: SharkTrustX.h:156
BaBool acceptTerms
Must be TRUE publicly; ignored privately.
Definition: SharkTrustX.h:155
SharkTrustX_Name onName
Optional confirmed-name callback, or NULL.
Definition: SharkTrustX.h:163
BaTimer * timer
Required dedicated timer using the server's mutex.
Definition: SharkTrustX.h:142
const char * email
Required contact email in public builds; ignored privately.
Definition: SharkTrustX.h:154
SharkSsl * clientSsl
Required client TLS context with trusted CA list.
Definition: SharkTrustX.h:144
const unsigned char * zoneKey
Required borrowed 32-byte tokengen zone key.
Definition: SharkTrustX.h:146
const char * portalDomain
Required tokengen domain only, without scheme/path.
Definition: SharkTrustX.h:145
SharkTrustX_Proof proof
Required tokengen proof callback.
Definition: SharkTrustX.h:147
HttpServer * server
Required initialized server with running dispatcher.
Definition: SharkTrustX.h:141
void * context
Optional borrowed application pointer for both callbacks.
Definition: SharkTrustX.h:164
SharkTrustX_Event onEvent
Optional status callback, or NULL.
Definition: SharkTrustX.h:162
const char * directoryUrl
Required absolute HTTPS ACME directory in public builds.
Definition: SharkTrustX.h:151
IoIntf * io
Required private writable state store; see Store keys and enrollment safely.
Definition: SharkTrustX.h:143
Snapshot of the certificate currently served by the managed listeners.
Definition: SharkTrustX.h:184
BaBool ready
TRUE when at least one listener has an unexpired certificate.
Definition: SharkTrustX.h:185
BaTime expires
Certificate expiry, UTC Unix seconds; zero if not ready.
Definition: SharkTrustX.h:187
BaTime renew
Renewal due time, UTC Unix seconds; zero if not ready.
Definition: SharkTrustX.h:188