Files
aevolution/tools/prepare-mbedtls.cmake
T
dingoandClaude Opus 5.5 8fbe093cc8 Implement M9.6 narrow secure dev-session protocol
Add protocol v1: versioned, bounded frames (Hello, Welcome, Intent,
IntentResult, environment/organism views, Close) carrying session, epoch
and commit watermark, with an explicit little-endian canonical codec, a
header-first FrameReader, seeded mutation tests and a libFuzzer target.
SessionAdmission enforces world/region scope, grant lifetime and skew,
single-use grants, one session per subject, epoch, replay, tick window
and per-session rate.

Dev identity is a 108-byte HMAC-SHA256 grant (PSA) that cannot be
created or verified outside the dev environment. Transport security is
TLS 1.3 only via pinned Mbed TLS 4.1.1 LTS with TLS 1.2, DTLS, tickets
and PSK compiled out, AEAD suites, ECDHE groups and a pinned dev CA.
Opt-in EVO_BUILD_NETWORK, new network CI suite. Sockets and region
integration follow in M9.7. ADR-0082 records the decision.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 18:53:55 -04:00

24 lines
1.1 KiB
CMake

cmake_minimum_required(VERSION 3.28)
include("${CMAKE_CURRENT_LIST_DIR}/mbedtls-pin.cmake")
set(root "${CMAKE_CURRENT_LIST_DIR}/../build/external/mbedtls")
file(MAKE_DIRECTORY "${root}")
if(NOT DEFINED MBEDTLS_ARCHIVE)
set(MBEDTLS_ARCHIVE "${root}/mbedtls-${EVO_MBEDTLS_VERSION}.tar.bz2")
if(NOT EXISTS "${MBEDTLS_ARCHIVE}")
file(DOWNLOAD "${EVO_MBEDTLS_URL}" "${MBEDTLS_ARCHIVE}" TLS_VERIFY ON
EXPECTED_HASH "SHA256=${EVO_MBEDTLS_SHA256}" STATUS result)
list(GET result 0 code)
if(NOT code EQUAL 0)
message(FATAL_ERROR "Mbed TLS download failed: ${result}")
endif()
endif()
endif()
file(SHA256 "${MBEDTLS_ARCHIVE}" actual)
if(NOT actual STREQUAL EVO_MBEDTLS_SHA256)
message(FATAL_ERROR "Mbed TLS archive checksum mismatch; refusing extraction")
endif()
file(REMOVE_RECURSE "${root}/mbedtls-${EVO_MBEDTLS_VERSION}")
file(ARCHIVE_EXTRACT INPUT "${MBEDTLS_ARCHIVE}" DESTINATION "${root}")
file(WRITE "${root}/mbedtls-${EVO_MBEDTLS_VERSION}/evo-verified.sha256" "${actual}\n")
message(STATUS "Prepared Mbed TLS ${EVO_MBEDTLS_VERSION}; license: ${root}/mbedtls-${EVO_MBEDTLS_VERSION}/LICENSE (Apache-2.0 option)")