MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / application_ui_readiness_proof

Function application_ui_readiness_proof

src/daemon/application.c:3240–3256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3238}
3239
3240static cbm_daemon_runtime_application_status_t application_ui_readiness_proof(
3241 cbm_daemon_application_t *application, const uint8_t *request, uint32_t request_length,
3242 uint8_t **response_out, uint32_t *response_length_out) {
3243 if (!application->ui_readiness_secret_set ||
3244 request_length != APPLICATION_UI_READINESS_REQUEST_SIZE) {
3245 return CBM_DAEMON_RUNTIME_APPLICATION_REJECTED;
3246 }
3247 uint8_t *proof = malloc(CBM_SHA256_DIGEST_LEN);
3248 if (!proof) {
3249 return CBM_DAEMON_RUNTIME_APPLICATION_HANDLER_ERROR;
3250 }
3251 cbm_hmac_sha256(application->ui_readiness_secret, sizeof(application->ui_readiness_secret),
3252 request + 1, CBM_SHA256_DIGEST_LEN, proof);
3253 *response_out = proof;
3254 *response_length_out = CBM_SHA256_DIGEST_LEN;
3255 return CBM_DAEMON_RUNTIME_APPLICATION_OK;
3256}
3257
3258static cbm_daemon_runtime_application_status_t application_request_dispatch(
3259 cbm_daemon_application_t *application, cbm_daemon_application_session_t *session,

Callers 1

Calls 1

cbm_hmac_sha256Function · 0.85

Tested by

no test coverage detected