Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mbedtls: Update to upstream version 2.28.3 #76200

Merged
merged 1 commit into from
Apr 20, 2023

Conversation

akien-mga
Copy link
Member

@akien-mga akien-mga commented Apr 18, 2023

Rediff patch from PR 1453, lstrlenW is no longer used upstream so that part of the patch was dropped:
Mbed-TLS/mbedtls#1453 (comment)

I'll try to assess if we can drop the whole patch with a test UWP build on 3.x.
Edit: the CryptGenRandom part is still needed, without it linking fails with:

modules.uwp.opt.32.x86.lib(entropy_poll.uwp.opt.32.x86.obj) : error LNK2001: unresolved external symbol _CryptAcquireContext
modules.uwp.opt.32.x86.lib(entropy_poll.uwp.opt.32.x86.obj) : error LNK2001: unresolved external symbol _CryptGenRandom

Bugfix release: https://github.com/Mbed-TLS/mbedtls/releases/tag/v2.28.3
There's one security relevant bugfix for MSVC builds specifically.

The diff is noisy as they changed their code style.

Edit: I've confirmed that the 3.x branch builds UWP fine with this PR backported.

Rediff patch from PR 1453, lstrlenW is no longer used upstream so
that part of the patch was dropped.
@akien-mga akien-mga added bug topic:thirdparty cherrypick:3.x Considered for cherry-picking into a future 3.x release cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release cherrypick:4.0 labels Apr 18, 2023
@akien-mga akien-mga added this to the 4.1 milestone Apr 18, 2023
@akien-mga akien-mga requested a review from a team as a code owner April 18, 2023 08:46
@akien-mga akien-mga requested a review from Faless April 18, 2023 08:46
@akien-mga akien-mga merged commit a58c5a9 into godotengine:master Apr 20, 2023
@akien-mga akien-mga deleted the mbedtls-2.28.3 branch April 20, 2023 10:51
@akien-mga
Copy link
Member Author

Note to self: More work needed before cherry-picking for 3.x, it did break the build for UWP arm32:

cl /Fothirdparty\mbedtls\library\hkdf.uwp.opt.32.arm.obj /c thirdparty\mbedtls\library\hkdf.c /std:c++14 /nologo /MD /O2 /GL /utf-8 /FS /MP /GS /Zc:wchar_t /Gm- /fp:precise /errorReport:prompt /Zc:forScope /Gd /
EHsc /nologo /AI "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\\vcpackages" /AI "C:\Program Files (x86)\Windows Kits\10\\References\CommonConfiguration\Neutral" /EHsc
/w /AI "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\lib/store/references" /AI "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.2702
3\lib/x86/store/references" /DNDEBUG /DNO_EDITOR_SPLASH /DUWP_ENABLED /DWINDOWS_ENABLED /DTYPED_METHOD_BIND /DGLES_ENABLED /DGL_GLEXT_PROTOTYPES /DEGL_EGLEXT_PROTOTYPES /DANGLE_ENABLED /DWINVER=0x0602 /D_WIN32_W
INNT=0x0602 /DWIN32 /D__WRL_NO_DEFAULT_LIB__ /DPNG_ABORT=abort /D_UNICODE /DUNICODE /DWINAPI_FAMILY=WINAPI_FAMILY_APP /DPTRCALL_ENABLED /DMINIZIP_ENABLED /DZSTD_STATIC_LINKING_ONLY /DXAUDIO2_ENABLED /Ithirdparty
\mbedtls\include /Ithirdparty\libpng /Ithirdparty\zstd /Ithirdparty\zlib /Iplatform\uwp /Idrivers\windows /IC:\angle\include /I.
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include\immintrin.h(17): fatal error C1189: #error:  This header is specific to X86 and X64 targets

@YuriSizov
Copy link
Contributor

Cherry-picked for 4.0.3.

@akien-mga
Copy link
Member Author

Cherry-picked for 3.6.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Aug 28, 2023
@akien-mga
Copy link
Member Author

Cherry-picked for 3.5.3.

@akien-mga akien-mga removed the cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release label Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants