|
UDIF: Universal Digital Identification Framework 1.1.0.0a (A1)
A quantum-secure cryptographic identification
|
Runtime treaty store. More...
Go to the source code of this file.
Data Structures | |
| struct | udif_treatystore_entry |
| Stored treaty record. More... | |
| struct | udif_treatystore_pending_query |
| Pending treaty query awaiting a signed response. More... | |
| struct | udif_treatystore |
| Fixed-capacity treaty table. More... | |
Typedefs | |
| typedef UDIF_EXPORT_API enum udif_treatystore_status | udif_treatystore_status |
| typedef UDIF_EXPORT_API struct udif_treatystore_entry | udif_treatystore_entry |
| typedef UDIF_EXPORT_API struct udif_treatystore_pending_query | udif_treatystore_pending_query |
| typedef UDIF_EXPORT_API struct udif_treatystore | udif_treatystore |
Enumerations | |
| enum | udif_treatystore_status { udif_treatystore_status_unknown = 0x00U , udif_treatystore_status_active = 0x01U , udif_treatystore_status_revoked = 0x02U , udif_treatystore_status_expired = 0x03U } |
| Runtime treaty status. More... | |
Functions | |
| UDIF_EXPORT_API void | udif_treatystore_initialize (udif_treatystore *store) |
| Initialize a treaty store. | |
| UDIF_EXPORT_API void | udif_treatystore_clear (udif_treatystore *store) |
| Clear a treaty store. | |
| UDIF_EXPORT_API udif_errors | udif_treatystore_add (udif_treatystore *store, const udif_treaty *treaty, udif_treatystore_status status, uint64_t nowsecs) |
| Add or update a treaty. | |
| UDIF_EXPORT_API const udif_treaty * | udif_treatystore_find (const udif_treatystore *store, const uint8_t *treatyid) |
| Find a treaty by identifier. | |
| UDIF_EXPORT_API udif_treatystore_status | udif_treatystore_get_status (const udif_treatystore *store, const uint8_t *treatyid) |
| Return a treaty status by identifier. | |
| UDIF_EXPORT_API udif_errors | udif_treatystore_set_status (udif_treatystore *store, const uint8_t *treatyid, udif_treatystore_status status, uint64_t nowsecs) |
| Set the status of an existing treaty. | |
| UDIF_EXPORT_API const udif_treaty * | udif_treatystore_find_active_for_query (udif_treatystore *store, const uint8_t *localser, const uint8_t *peerser, uint8_t querytype, uint64_t nowsecs) |
| Find an active treaty linking the local and peer serials. | |
| UDIF_EXPORT_API udif_errors | udif_treatystore_add_pending_query (udif_treatystore *store, const uint8_t *treatyid, const uint8_t *peerser, const udif_query *query, uint64_t expires) |
| Add a pending treaty query response expectation. | |
| UDIF_EXPORT_API udif_errors | udif_treatystore_consume_pending_response (udif_treatystore *store, const uint8_t *localser, const uint8_t *peerser, const udif_query_response *response, uint64_t nowsecs) |
| Consume a pending treaty response expectation. | |
Runtime treaty store.
The treaty store is a fixed-capacity table keyed by treaty identifier. It records active and revoked bilateral treaties and provides peer/query lookup helpers for cross-domain forwarding enforcement.
| UDIF_EXPORT_API udif_errors udif_treatystore_add | ( | udif_treatystore * | store, |
| const udif_treaty * | treaty, | ||
| udif_treatystore_status | status, | ||
| uint64_t | nowsecs ) |
Add or update a treaty.
| store | The treaty store. |
| treaty | [const] The treaty to store. |
| status | The treaty status. |
| nowsecs | The UTC status time. |
| UDIF_EXPORT_API udif_errors udif_treatystore_add_pending_query | ( | udif_treatystore * | store, |
| const uint8_t * | treatyid, | ||
| const uint8_t * | peerser, | ||
| const udif_query * | query, | ||
| uint64_t | expires ) |
Add a pending treaty query response expectation.
| store | The treaty store. |
| treatyid | [const] The treaty identifier. |
| peerser | [const] The expected responding peer serial. |
| query | [const] The outbound treaty query. |
| expires | The expiration time for the pending response. |
| UDIF_EXPORT_API void udif_treatystore_clear | ( | udif_treatystore * | store | ) |
Clear a treaty store.
| store | The treaty store. |
| UDIF_EXPORT_API udif_errors udif_treatystore_consume_pending_response | ( | udif_treatystore * | store, |
| const uint8_t * | localser, | ||
| const uint8_t * | peerser, | ||
| const udif_query_response * | response, | ||
| uint64_t | nowsecs ) |
Consume a pending treaty response expectation.
A matching pending query is removed only when the response query id, embedded query digest, expected peer, and expected query type match.
| store | The treaty store. |
| localser | [const] The local controller serial. |
| peerser | [const] The responding peer serial. |
| response | [const] The treaty query response. |
| nowsecs | The current UTC time. |
| UDIF_EXPORT_API const udif_treaty * udif_treatystore_find | ( | const udif_treatystore * | store, |
| const uint8_t * | treatyid ) |
Find a treaty by identifier.
| store | [const] The treaty store. |
| treatyid | [const] The treaty identifier. |
| UDIF_EXPORT_API const udif_treaty * udif_treatystore_find_active_for_query | ( | udif_treatystore * | store, |
| const uint8_t * | localser, | ||
| const uint8_t * | peerser, | ||
| uint8_t | querytype, | ||
| uint64_t | nowsecs ) |
Find an active treaty linking the local and peer serials.
| store | The treaty store. |
| localser | [const] The local domain-controller serial. |
| peerser | [const] The peer domain-controller serial. |
| querytype | The requested query predicate family. |
| nowsecs | The UTC validation time. |
| UDIF_EXPORT_API udif_treatystore_status udif_treatystore_get_status | ( | const udif_treatystore * | store, |
| const uint8_t * | treatyid ) |
Return a treaty status by identifier.
| store | [const] The treaty store. |
| treatyid | [const] The treaty identifier. |
| UDIF_EXPORT_API void udif_treatystore_initialize | ( | udif_treatystore * | store | ) |
Initialize a treaty store.
| store | The treaty store. |
| UDIF_EXPORT_API udif_errors udif_treatystore_set_status | ( | udif_treatystore * | store, |
| const uint8_t * | treatyid, | ||
| udif_treatystore_status | status, | ||
| uint64_t | nowsecs ) |
Set the status of an existing treaty.
| store | The treaty store. |
| treatyid | [const] The treaty identifier. |
| status | The new status. |
| nowsecs | The UTC status time. |