From f2beba48f502960474531df87b80805fd454b4c1 Mon Sep 17 00:00:00 2001 From: Lee Date: Thu, 3 Apr 2025 09:47:32 -0400 Subject: [PATCH] windows: use the mbedtls-3.6.3 library for https inspection --- windows/MYconfigure | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/windows/MYconfigure b/windows/MYconfigure index ff82f390..3e78fe3a 100755 --- a/windows/MYconfigure +++ b/windows/MYconfigure @@ -38,6 +38,9 @@ export CPPFLAGS="" export LDFLAGS="" # start with initially empty flags +export LIBS="" +# start with initially empty flags + CFLAGS="${CFLAGS} -fdiagnostics-color=always" # Have gcc diagnostics be in color even if stderr is not going to a terminal. @@ -158,22 +161,28 @@ fi CPPFLAGS="${CPPFLAGS} -I${inc}" LDFLAGS="${LDFLAGS} -L${lib}" +# pick a library for doing https interception (ie. playing man-in-the-middle) +# mbedtls +# none +mitmlib="mbedtls" + +if [ "$mitmlib" = "mbedtls" ]; then +MITMOPT="--with-mbedtls" + # mbedtls -## https://github.com/Mbed-TLS/mbedtls/releases/tag/v2.16.12 -## This is the last release of the 2.16 long-time support branch. -## Users who want a long-time branch should move to mbedtls-2.28, -## which is backward-compatible and will be supported for at least -## 3 years. -# Get the 2.28.x mbedtls library from https://github.com/Mbed-TLS/mbedtls/tags -# Release Notes: https://github.com/Mbed-TLS/mbedtls/releases/tag/v2.28.4 - -##MITMOPT="--with-mbedtls" -##inc="/source/mbedtls-2.28.4/include" -##lib="/source/mbedtls-2.28.4/library" -##CPPFLAGS="${CPPFLAGS} -I${inc}" -##LDFLAGS="${LDFLAGS} -L${lib}" - -MITMOPT="--with-openssl" +# Get the 3.6.x mbedtls library from https://github.com/Mbed-TLS/mbedtls/tags +# Release Notes: https://github.com/Mbed-TLS/mbedtls/releases?q=3.6.3 + +inc="/source/mbedtls-3.6.3/include" +lib="/source/mbedtls-3.6.3/library" +CPPFLAGS="${CPPFLAGS} -I${inc}" +LDFLAGS="${LDFLAGS} -L${lib}" +LIBS="${LIBS} -lbcrypt" +# fixes the undefined reference to `BCryptGenRandom@16' + +else + MITMOPT="" +fi # brotli # Get the brotli library from https://github.com/google/brotli/releases -- 2.49.0