From a2b55d63aa1882b3f0aea8d5d6b606e322699504 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Tue, 11 Aug 2026 22:49:15 +1000 Subject: [PATCH 01/17] OpenSSL fix for x509 OpenSSL 4 and 3 --- libs/openFrameworks/utils/ofURLFileLoader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/openFrameworks/utils/ofURLFileLoader.cpp b/libs/openFrameworks/utils/ofURLFileLoader.cpp index 1e86ef7df92..d4d575008d8 100644 --- a/libs/openFrameworks/utils/ofURLFileLoader.cpp +++ b/libs/openFrameworks/utils/ofURLFileLoader.cpp @@ -183,7 +183,7 @@ void ofURLFileLoaderImpl::createSSLCertificate() { X509_gmtime_adj(X509_get_notBefore(x509), 0); X509_gmtime_adj(X509_get_notAfter(x509), 31536000L); // 1 year X509_set_pubkey(x509, pkey); - X509_NAME * name = X509_get_subject_name(x509); + X509_NAME * name = const_cast(X509_get_subject_name(x509)); if (!name) { X509_free(x509); EVP_PKEY_free(pkey); From 8cf389ffc7b6a6b7d437df6c2212f7f2ca86c188 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Wed, 12 Aug 2026 19:49:18 +1000 Subject: [PATCH 02/17] bcrypt added to VisualStudio additonal --- .../project/vs/openFrameworksDebug.props | 6 +++--- .../project/vs/openFrameworksRelease.props | 6 +++--- .../project/vs2026/openFrameworksDebug.props | 6 +++--- .../project/vs2026/openFrameworksRelease.props | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/libs/openFrameworksCompiled/project/vs/openFrameworksDebug.props b/libs/openFrameworksCompiled/project/vs/openFrameworksDebug.props index d7de8a1dbe3..cf224053046 100644 --- a/libs/openFrameworksCompiled/project/vs/openFrameworksDebug.props +++ b/libs/openFrameworksCompiled/project/vs/openFrameworksDebug.props @@ -16,7 +16,7 @@ $(OF_ROOT)\libs\glfw\lib\vs\x64;$(OF_ROOT)\libs\rtAudio\lib\vs\x64;$(OF_ROOT)\libs\FreeImage\lib\vs\x64;$(OF_ROOT)\libs\brotli\lib\vs\x64;$(OF_ROOT)\libs\freetype\lib\vs\x64;$(OF_ROOT)\libs\videoInput\lib\vs\x64;$(OF_ROOT)\libs\cairo\lib\vs\x64;$(OF_ROOT)\libs\pixman\lib\vs\x64;$(OF_ROOT)\libs\libpng\lib\vs\x64;$(OF_ROOT)\libs\zlib\lib\vs\x64;$(OF_ROOT)\libs\glew\lib\vs\x64;$(OF_ROOT)\libs\glu\lib\vs\x64;$(OF_ROOT)\libs\openssl\lib\vs\x64;$(OF_ROOT)\libs\curl\lib\vs\x64;$(OF_ROOT)\libs\tess2\lib\vs\x64;$(OF_ROOT)\libs\uriparser\lib\vs\x64;$(OF_ROOT)\libs\pugixml\lib\vs\x64;%(AdditionalLibraryDirectories) - libcairo.lib;libpixman-1.lib;libpng.lib;zlib.lib;brotlicommon.lib;brotlidec.lib;brotlienc.lib;msimg32.lib;OpenGL32.lib;kernel32.lib;setupapi.lib;Vfw32.lib;comctl32.lib;rtAudioD.lib;videoInputD.lib;freetyped.lib;FreeImageD.lib;dsound.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;libglew32.lib;libssl.lib;libcrypto.lib;crypt32.lib;libcurl.lib;uriparser.lib;pugixmlD.lib;Ws2_32.lib;tess2.lib;glfw3.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies) + libcairo.lib;libpixman-1.lib;libpng.lib;zlib.lib;brotlicommon.lib;brotlidec.lib;brotlienc.lib;msimg32.lib;OpenGL32.lib;kernel32.lib;setupapi.lib;Vfw32.lib;comctl32.lib;rtAudioD.lib;videoInputD.lib;freetyped.lib;FreeImageD.lib;dsound.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;libglew32.lib;libssl.lib;libcrypto.lib;crypt32.lib;bcrypt.lib;libcurl.lib;uriparser.lib;pugixmlD.lib;Ws2_32.lib;tess2.lib;glfw3.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies) /ignore:4099 %(AdditionalOptions) false atlthunk.lib;msvcrt;libcmt;LIBC;LIBCMTD @@ -30,7 +30,7 @@ $(OF_ROOT)\libs\glfw\lib\vs\ARM64;$(OF_ROOT)\libs\rtAudio\lib\vs\ARM64;$(OF_ROOT)\libs\FreeImage\lib\vs\ARM64;$(OF_ROOT)\libs\brotli\lib\vs\ARM64;$(OF_ROOT)\libs\freetype\lib\vs\ARM64;$(OF_ROOT)\libs\videoInput\lib\vs\ARM64;$(OF_ROOT)\libs\cairo\lib\vs\ARM64;$(OF_ROOT)\libs\pixman\lib\vs\ARM64;$(OF_ROOT)\libs\libpng\lib\vs\ARM64;$(OF_ROOT)\libs\zlib\lib\vs\ARM64;$(OF_ROOT)\libs\glew\lib\vs\ARM64;$(OF_ROOT)\libs\glu\lib\vs\ARM64;$(OF_ROOT)\libs\openssl\lib\vs\ARM64;$(OF_ROOT)\libs\curl\lib\vs\ARM64;$(OF_ROOT)\libs\tess2\lib\vs\ARM64;$(OF_ROOT)\libs\uriparser\lib\vs\ARM64;$(OF_ROOT)\libs\pugixml\lib\vs\ARM64;%(AdditionalLibraryDirectories) - libcairo.lib;libpixman-1.lib;libpng.lib;zlib.lib;brotlicommon.lib;brotlidec.lib;brotlienc.lib;msimg32.lib;OpenGL32.lib;kernel32.lib;setupapi.lib;Vfw32.lib;comctl32.lib;rtAudioD.lib;videoInputD.lib;freetyped.lib;FreeImageD.lib;dsound.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;libglew32.lib;libssl.lib;libcrypto.lib;crypt32.lib;libcurl.lib;uriparser.lib;pugixmlD.lib;Ws2_32.lib;tess2.lib;glfw3.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies) + libcairo.lib;libpixman-1.lib;libpng.lib;zlib.lib;brotlicommon.lib;brotlidec.lib;brotlienc.lib;msimg32.lib;OpenGL32.lib;kernel32.lib;setupapi.lib;Vfw32.lib;comctl32.lib;rtAudioD.lib;videoInputD.lib;freetyped.lib;FreeImageD.lib;dsound.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;libglew32.lib;libssl.lib;libcrypto.lib;crypt32.lib;bcrypt.lib;libcurl.lib;uriparser.lib;pugixmlD.lib;Ws2_32.lib;tess2.lib;glfw3.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies) /ignore:4099 %(AdditionalOptions) true atlthunk.lib;msvcrt;libcmt;LIBC;LIBCMTD @@ -44,7 +44,7 @@ $(OF_ROOT)\libs\glfw\lib\vs\ARM64EC;$(OF_ROOT)\libs\rtAudio\lib\vs\ARM64EC;$(OF_ROOT)\libs\FreeImage\lib\vs\ARM64EC;$(OF_ROOT)\libs\brotli\lib\vs\ARM64EC;$(OF_ROOT)\libs\freetype\lib\vs\ARM64EC;$(OF_ROOT)\libs\videoInput\lib\vs\ARM64EC;$(OF_ROOT)\libs\cairo\lib\vs\ARM64EC;$(OF_ROOT)\libs\pixman\lib\vs\ARM64EC;$(OF_ROOT)\libs\libpng\lib\vs\ARM64EC;$(OF_ROOT)\libs\zlib\lib\vs\ARM64EC;$(OF_ROOT)\libs\glew\lib\vs\ARM64EC;$(OF_ROOT)\libs\glu\lib\vs\ARM64EC;$(OF_ROOT)\libs\openssl\lib\vs\ARM64EC;$(OF_ROOT)\libs\curl\lib\vs\ARM64EC;$(OF_ROOT)\libs\tess2\lib\vs\ARM64EC;$(OF_ROOT)\libs\uriparser\lib\vs\ARM64EC;$(OF_ROOT)\libs\pugixml\lib\vs\ARM64EC;%(AdditionalLibraryDirectories) - libcairo.lib;libpixman-1.lib;libpng.lib;zlib.lib;brotlicommon.lib;brotlidec.lib;brotlienc.lib;msimg32.lib;OpenGL32.lib;kernel32.lib;setupapi.lib;Vfw32.lib;comctl32.lib;rtAudioD.lib;videoInputD.lib;freetyped.lib;FreeImageD.lib;dsound.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;libglew32.lib;libssl.lib;libcrypto.lib;crypt32.lib;libcurl.lib;uriparser.lib;pugixmlD.lib;Ws2_32.lib;tess2.lib;glfw3.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies) + libcairo.lib;libpixman-1.lib;libpng.lib;zlib.lib;brotlicommon.lib;brotlidec.lib;brotlienc.lib;msimg32.lib;OpenGL32.lib;kernel32.lib;setupapi.lib;Vfw32.lib;comctl32.lib;rtAudioD.lib;videoInputD.lib;freetyped.lib;FreeImageD.lib;dsound.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;libglew32.lib;libssl.lib;libcrypto.lib;crypt32.lib;bcrypt.lib;libcurl.lib;uriparser.lib;pugixmlD.lib;Ws2_32.lib;tess2.lib;glfw3.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies) /ignore:4099 %(AdditionalOptions) true atlthunk.lib;msvcrt;libcmt;LIBC;LIBCMTD diff --git a/libs/openFrameworksCompiled/project/vs/openFrameworksRelease.props b/libs/openFrameworksCompiled/project/vs/openFrameworksRelease.props index 86fd63f9a2d..6001c9108da 100644 --- a/libs/openFrameworksCompiled/project/vs/openFrameworksRelease.props +++ b/libs/openFrameworksCompiled/project/vs/openFrameworksRelease.props @@ -16,7 +16,7 @@ $(OF_ROOT)\libs\glfw\lib\vs\x64;$(OF_ROOT)\libs\rtAudio\lib\vs\x64;$(OF_ROOT)\libs\FreeImage\lib\vs\x64;$(OF_ROOT)\libs\brotli\lib\vs\x64;$(OF_ROOT)\libs\freetype\lib\vs\x64;$(OF_ROOT)\libs\videoInput\lib\vs\x64;$(OF_ROOT)\libs\cairo\lib\vs\x64;$(OF_ROOT)\libs\pixman\lib\vs\x64;$(OF_ROOT)\libs\libpng\lib\vs\x64;$(OF_ROOT)\libs\zlib\lib\vs\x64;$(OF_ROOT)\libs\glew\lib\vs\x64;$(OF_ROOT)\libs\glu\lib\vs\x64;$(OF_ROOT)\libs\openssl\lib\vs\x64;$(OF_ROOT)\libs\curl\lib\vs\x64;$(OF_ROOT)\libs\tess2\lib\vs\x64;$(OF_ROOT)\libs\uriparser\lib\vs\x64;$(OF_ROOT)\libs\pugixml\lib\vs\x64;%(AdditionalLibraryDirectories) - libcairo.lib;libpixman-1.lib;libpng.lib;zlib.lib;brotlicommon.lib;brotlidec.lib;brotlienc.lib;msimg32.lib;OpenGL32.lib;GLu32.lib;kernel32.lib;setupapi.lib;Vfw32.lib;comctl32.lib;rtAudio.lib;videoInput.lib;freetype.lib;FreeImage.lib;dsound.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;libglew32.lib;libssl.lib;libcrypto.lib;crypt32.lib;libcurl.lib;uriparser.lib;pugixml.lib;Ws2_32.lib;tess2.lib;glfw3.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies) + libcairo.lib;libpixman-1.lib;libpng.lib;zlib.lib;brotlicommon.lib;brotlidec.lib;brotlienc.lib;msimg32.lib;OpenGL32.lib;GLu32.lib;kernel32.lib;setupapi.lib;Vfw32.lib;comctl32.lib;rtAudio.lib;videoInput.lib;freetype.lib;FreeImage.lib;dsound.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;libglew32.lib;libssl.lib;libcrypto.lib;crypt32.lib;bcrypt.lib;libcurl.lib;uriparser.lib;pugixml.lib;Ws2_32.lib;tess2.lib;glfw3.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies) true atlthunk.lib;LIBC.lib;LIBCMT @@ -29,7 +29,7 @@ $(OF_ROOT)\libs\glfw\lib\vs\ARM64;$(OF_ROOT)\libs\rtAudio\lib\vs\ARM64;$(OF_ROOT)\libs\FreeImage\lib\vs\ARM64;$(OF_ROOT)\libs\brotli\lib\vs\ARM64;$(OF_ROOT)\libs\freetype\lib\vs\ARM64;$(OF_ROOT)\libs\videoInput\lib\vs\ARM64;$(OF_ROOT)\libs\cairo\lib\vs\ARM64;$(OF_ROOT)\libs\pixman\lib\vs\ARM64;$(OF_ROOT)\libs\libpng\lib\vs\ARM64;$(OF_ROOT)\libs\zlib\lib\vs\ARM64;$(OF_ROOT)\libs\glew\lib\vs\ARM64;$(OF_ROOT)\libs\glu\lib\vs\ARM64;$(OF_ROOT)\libs\openssl\lib\vs\ARM64;$(OF_ROOT)\libs\curl\lib\vs\ARM64;$(OF_ROOT)\libs\tess2\lib\vs\ARM64;$(OF_ROOT)\libs\uriparser\lib\vs\ARM64;$(OF_ROOT)\libs\pugixml\lib\vs\ARM64;%(AdditionalLibraryDirectories) - libcairo.lib;libpixman-1.lib;libpng.lib;zlib.lib;brotlicommon.lib;brotlidec.lib;brotlienc.lib;msimg32.lib;OpenGL32.lib;GLu32.lib;kernel32.lib;setupapi.lib;Vfw32.lib;comctl32.lib;rtAudio.lib;videoInput.lib;freetype.lib;FreeImage.lib;dsound.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;libglew32.lib;libssl.lib;libcrypto.lib;crypt32.lib;libcurl.lib;uriparser.lib;pugixml.lib;Ws2_32.lib;tess2.lib;glfw3.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies) + libcairo.lib;libpixman-1.lib;libpng.lib;zlib.lib;brotlicommon.lib;brotlidec.lib;brotlienc.lib;msimg32.lib;OpenGL32.lib;GLu32.lib;kernel32.lib;setupapi.lib;Vfw32.lib;comctl32.lib;rtAudio.lib;videoInput.lib;freetype.lib;FreeImage.lib;dsound.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;libglew32.lib;libssl.lib;libcrypto.lib;crypt32.lib;bcrypt.lib;libcurl.lib;uriparser.lib;pugixml.lib;Ws2_32.lib;tess2.lib;glfw3.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies) true atlthunk.lib;LIBC.lib;LIBCMT @@ -42,7 +42,7 @@ $(OF_ROOT)\libs\glfw\lib\vs\ARM64EC;$(OF_ROOT)\libs\rtAudio\lib\vs\ARM64EC;$(OF_ROOT)\libs\FreeImage\lib\vs\ARM64EC;$(OF_ROOT)\libs\brotli\lib\vs\ARM64EC;$(OF_ROOT)\libs\freetype\lib\vs\ARM64EC;$(OF_ROOT)\libs\videoInput\lib\vs\ARM64EC;$(OF_ROOT)\libs\cairo\lib\vs\ARM64EC;$(OF_ROOT)\libs\pixman\lib\vs\ARM64EC;$(OF_ROOT)\libs\libpng\lib\vs\ARM64EC;$(OF_ROOT)\libs\zlib\lib\vs\ARM64EC;$(OF_ROOT)\libs\glew\lib\vs\ARM64EC;$(OF_ROOT)\libs\glu\lib\vs\ARM64EC;$(OF_ROOT)\libs\openssl\lib\vs\ARM64EC;$(OF_ROOT)\libs\curl\lib\vs\ARM64EC;$(OF_ROOT)\libs\tess2\lib\vs\ARM64EC;$(OF_ROOT)\libs\uriparser\lib\vs\ARM64EC;$(OF_ROOT)\libs\pugixml\lib\vs\ARM64EC;%(AdditionalLibraryDirectories) - libcairo.lib;libpixman-1.lib;libpng.lib;zlib.lib;brotlicommon.lib;brotlidec.lib;brotlienc.lib;msimg32.lib;OpenGL32.lib;GLu32.lib;kernel32.lib;setupapi.lib;Vfw32.lib;comctl32.lib;rtAudio.lib;videoInput.lib;freetype.lib;FreeImage.lib;dsound.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;libglew32.lib;libssl.lib;libcrypto.lib;crypt32.lib;libcurl.lib;uriparser.lib;pugixml.lib;Ws2_32.lib;tess2.lib;glfw3.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies) + libcairo.lib;libpixman-1.lib;libpng.lib;zlib.lib;brotlicommon.lib;brotlidec.lib;brotlienc.lib;msimg32.lib;OpenGL32.lib;GLu32.lib;kernel32.lib;setupapi.lib;Vfw32.lib;comctl32.lib;rtAudio.lib;videoInput.lib;freetype.lib;FreeImage.lib;dsound.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;libglew32.lib;libssl.lib;libcrypto.lib;crypt32.lib;bcrypt.lib;libcurl.lib;uriparser.lib;pugixml.lib;Ws2_32.lib;tess2.lib;glfw3.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies) true atlthunk.lib;LIBC.lib;LIBCMT diff --git a/libs/openFrameworksCompiled/project/vs2026/openFrameworksDebug.props b/libs/openFrameworksCompiled/project/vs2026/openFrameworksDebug.props index d7de8a1dbe3..cf224053046 100644 --- a/libs/openFrameworksCompiled/project/vs2026/openFrameworksDebug.props +++ b/libs/openFrameworksCompiled/project/vs2026/openFrameworksDebug.props @@ -16,7 +16,7 @@ $(OF_ROOT)\libs\glfw\lib\vs\x64;$(OF_ROOT)\libs\rtAudio\lib\vs\x64;$(OF_ROOT)\libs\FreeImage\lib\vs\x64;$(OF_ROOT)\libs\brotli\lib\vs\x64;$(OF_ROOT)\libs\freetype\lib\vs\x64;$(OF_ROOT)\libs\videoInput\lib\vs\x64;$(OF_ROOT)\libs\cairo\lib\vs\x64;$(OF_ROOT)\libs\pixman\lib\vs\x64;$(OF_ROOT)\libs\libpng\lib\vs\x64;$(OF_ROOT)\libs\zlib\lib\vs\x64;$(OF_ROOT)\libs\glew\lib\vs\x64;$(OF_ROOT)\libs\glu\lib\vs\x64;$(OF_ROOT)\libs\openssl\lib\vs\x64;$(OF_ROOT)\libs\curl\lib\vs\x64;$(OF_ROOT)\libs\tess2\lib\vs\x64;$(OF_ROOT)\libs\uriparser\lib\vs\x64;$(OF_ROOT)\libs\pugixml\lib\vs\x64;%(AdditionalLibraryDirectories) - libcairo.lib;libpixman-1.lib;libpng.lib;zlib.lib;brotlicommon.lib;brotlidec.lib;brotlienc.lib;msimg32.lib;OpenGL32.lib;kernel32.lib;setupapi.lib;Vfw32.lib;comctl32.lib;rtAudioD.lib;videoInputD.lib;freetyped.lib;FreeImageD.lib;dsound.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;libglew32.lib;libssl.lib;libcrypto.lib;crypt32.lib;libcurl.lib;uriparser.lib;pugixmlD.lib;Ws2_32.lib;tess2.lib;glfw3.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies) + libcairo.lib;libpixman-1.lib;libpng.lib;zlib.lib;brotlicommon.lib;brotlidec.lib;brotlienc.lib;msimg32.lib;OpenGL32.lib;kernel32.lib;setupapi.lib;Vfw32.lib;comctl32.lib;rtAudioD.lib;videoInputD.lib;freetyped.lib;FreeImageD.lib;dsound.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;libglew32.lib;libssl.lib;libcrypto.lib;crypt32.lib;bcrypt.lib;libcurl.lib;uriparser.lib;pugixmlD.lib;Ws2_32.lib;tess2.lib;glfw3.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies) /ignore:4099 %(AdditionalOptions) false atlthunk.lib;msvcrt;libcmt;LIBC;LIBCMTD @@ -30,7 +30,7 @@ $(OF_ROOT)\libs\glfw\lib\vs\ARM64;$(OF_ROOT)\libs\rtAudio\lib\vs\ARM64;$(OF_ROOT)\libs\FreeImage\lib\vs\ARM64;$(OF_ROOT)\libs\brotli\lib\vs\ARM64;$(OF_ROOT)\libs\freetype\lib\vs\ARM64;$(OF_ROOT)\libs\videoInput\lib\vs\ARM64;$(OF_ROOT)\libs\cairo\lib\vs\ARM64;$(OF_ROOT)\libs\pixman\lib\vs\ARM64;$(OF_ROOT)\libs\libpng\lib\vs\ARM64;$(OF_ROOT)\libs\zlib\lib\vs\ARM64;$(OF_ROOT)\libs\glew\lib\vs\ARM64;$(OF_ROOT)\libs\glu\lib\vs\ARM64;$(OF_ROOT)\libs\openssl\lib\vs\ARM64;$(OF_ROOT)\libs\curl\lib\vs\ARM64;$(OF_ROOT)\libs\tess2\lib\vs\ARM64;$(OF_ROOT)\libs\uriparser\lib\vs\ARM64;$(OF_ROOT)\libs\pugixml\lib\vs\ARM64;%(AdditionalLibraryDirectories) - libcairo.lib;libpixman-1.lib;libpng.lib;zlib.lib;brotlicommon.lib;brotlidec.lib;brotlienc.lib;msimg32.lib;OpenGL32.lib;kernel32.lib;setupapi.lib;Vfw32.lib;comctl32.lib;rtAudioD.lib;videoInputD.lib;freetyped.lib;FreeImageD.lib;dsound.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;libglew32.lib;libssl.lib;libcrypto.lib;crypt32.lib;libcurl.lib;uriparser.lib;pugixmlD.lib;Ws2_32.lib;tess2.lib;glfw3.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies) + libcairo.lib;libpixman-1.lib;libpng.lib;zlib.lib;brotlicommon.lib;brotlidec.lib;brotlienc.lib;msimg32.lib;OpenGL32.lib;kernel32.lib;setupapi.lib;Vfw32.lib;comctl32.lib;rtAudioD.lib;videoInputD.lib;freetyped.lib;FreeImageD.lib;dsound.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;libglew32.lib;libssl.lib;libcrypto.lib;crypt32.lib;bcrypt.lib;libcurl.lib;uriparser.lib;pugixmlD.lib;Ws2_32.lib;tess2.lib;glfw3.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies) /ignore:4099 %(AdditionalOptions) true atlthunk.lib;msvcrt;libcmt;LIBC;LIBCMTD @@ -44,7 +44,7 @@ $(OF_ROOT)\libs\glfw\lib\vs\ARM64EC;$(OF_ROOT)\libs\rtAudio\lib\vs\ARM64EC;$(OF_ROOT)\libs\FreeImage\lib\vs\ARM64EC;$(OF_ROOT)\libs\brotli\lib\vs\ARM64EC;$(OF_ROOT)\libs\freetype\lib\vs\ARM64EC;$(OF_ROOT)\libs\videoInput\lib\vs\ARM64EC;$(OF_ROOT)\libs\cairo\lib\vs\ARM64EC;$(OF_ROOT)\libs\pixman\lib\vs\ARM64EC;$(OF_ROOT)\libs\libpng\lib\vs\ARM64EC;$(OF_ROOT)\libs\zlib\lib\vs\ARM64EC;$(OF_ROOT)\libs\glew\lib\vs\ARM64EC;$(OF_ROOT)\libs\glu\lib\vs\ARM64EC;$(OF_ROOT)\libs\openssl\lib\vs\ARM64EC;$(OF_ROOT)\libs\curl\lib\vs\ARM64EC;$(OF_ROOT)\libs\tess2\lib\vs\ARM64EC;$(OF_ROOT)\libs\uriparser\lib\vs\ARM64EC;$(OF_ROOT)\libs\pugixml\lib\vs\ARM64EC;%(AdditionalLibraryDirectories) - libcairo.lib;libpixman-1.lib;libpng.lib;zlib.lib;brotlicommon.lib;brotlidec.lib;brotlienc.lib;msimg32.lib;OpenGL32.lib;kernel32.lib;setupapi.lib;Vfw32.lib;comctl32.lib;rtAudioD.lib;videoInputD.lib;freetyped.lib;FreeImageD.lib;dsound.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;libglew32.lib;libssl.lib;libcrypto.lib;crypt32.lib;libcurl.lib;uriparser.lib;pugixmlD.lib;Ws2_32.lib;tess2.lib;glfw3.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies) + libcairo.lib;libpixman-1.lib;libpng.lib;zlib.lib;brotlicommon.lib;brotlidec.lib;brotlienc.lib;msimg32.lib;OpenGL32.lib;kernel32.lib;setupapi.lib;Vfw32.lib;comctl32.lib;rtAudioD.lib;videoInputD.lib;freetyped.lib;FreeImageD.lib;dsound.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;libglew32.lib;libssl.lib;libcrypto.lib;crypt32.lib;bcrypt.lib;libcurl.lib;uriparser.lib;pugixmlD.lib;Ws2_32.lib;tess2.lib;glfw3.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies) /ignore:4099 %(AdditionalOptions) true atlthunk.lib;msvcrt;libcmt;LIBC;LIBCMTD diff --git a/libs/openFrameworksCompiled/project/vs2026/openFrameworksRelease.props b/libs/openFrameworksCompiled/project/vs2026/openFrameworksRelease.props index 86fd63f9a2d..6001c9108da 100644 --- a/libs/openFrameworksCompiled/project/vs2026/openFrameworksRelease.props +++ b/libs/openFrameworksCompiled/project/vs2026/openFrameworksRelease.props @@ -16,7 +16,7 @@ $(OF_ROOT)\libs\glfw\lib\vs\x64;$(OF_ROOT)\libs\rtAudio\lib\vs\x64;$(OF_ROOT)\libs\FreeImage\lib\vs\x64;$(OF_ROOT)\libs\brotli\lib\vs\x64;$(OF_ROOT)\libs\freetype\lib\vs\x64;$(OF_ROOT)\libs\videoInput\lib\vs\x64;$(OF_ROOT)\libs\cairo\lib\vs\x64;$(OF_ROOT)\libs\pixman\lib\vs\x64;$(OF_ROOT)\libs\libpng\lib\vs\x64;$(OF_ROOT)\libs\zlib\lib\vs\x64;$(OF_ROOT)\libs\glew\lib\vs\x64;$(OF_ROOT)\libs\glu\lib\vs\x64;$(OF_ROOT)\libs\openssl\lib\vs\x64;$(OF_ROOT)\libs\curl\lib\vs\x64;$(OF_ROOT)\libs\tess2\lib\vs\x64;$(OF_ROOT)\libs\uriparser\lib\vs\x64;$(OF_ROOT)\libs\pugixml\lib\vs\x64;%(AdditionalLibraryDirectories) - libcairo.lib;libpixman-1.lib;libpng.lib;zlib.lib;brotlicommon.lib;brotlidec.lib;brotlienc.lib;msimg32.lib;OpenGL32.lib;GLu32.lib;kernel32.lib;setupapi.lib;Vfw32.lib;comctl32.lib;rtAudio.lib;videoInput.lib;freetype.lib;FreeImage.lib;dsound.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;libglew32.lib;libssl.lib;libcrypto.lib;crypt32.lib;libcurl.lib;uriparser.lib;pugixml.lib;Ws2_32.lib;tess2.lib;glfw3.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies) + libcairo.lib;libpixman-1.lib;libpng.lib;zlib.lib;brotlicommon.lib;brotlidec.lib;brotlienc.lib;msimg32.lib;OpenGL32.lib;GLu32.lib;kernel32.lib;setupapi.lib;Vfw32.lib;comctl32.lib;rtAudio.lib;videoInput.lib;freetype.lib;FreeImage.lib;dsound.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;libglew32.lib;libssl.lib;libcrypto.lib;crypt32.lib;bcrypt.lib;libcurl.lib;uriparser.lib;pugixml.lib;Ws2_32.lib;tess2.lib;glfw3.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies) true atlthunk.lib;LIBC.lib;LIBCMT @@ -29,7 +29,7 @@ $(OF_ROOT)\libs\glfw\lib\vs\ARM64;$(OF_ROOT)\libs\rtAudio\lib\vs\ARM64;$(OF_ROOT)\libs\FreeImage\lib\vs\ARM64;$(OF_ROOT)\libs\brotli\lib\vs\ARM64;$(OF_ROOT)\libs\freetype\lib\vs\ARM64;$(OF_ROOT)\libs\videoInput\lib\vs\ARM64;$(OF_ROOT)\libs\cairo\lib\vs\ARM64;$(OF_ROOT)\libs\pixman\lib\vs\ARM64;$(OF_ROOT)\libs\libpng\lib\vs\ARM64;$(OF_ROOT)\libs\zlib\lib\vs\ARM64;$(OF_ROOT)\libs\glew\lib\vs\ARM64;$(OF_ROOT)\libs\glu\lib\vs\ARM64;$(OF_ROOT)\libs\openssl\lib\vs\ARM64;$(OF_ROOT)\libs\curl\lib\vs\ARM64;$(OF_ROOT)\libs\tess2\lib\vs\ARM64;$(OF_ROOT)\libs\uriparser\lib\vs\ARM64;$(OF_ROOT)\libs\pugixml\lib\vs\ARM64;%(AdditionalLibraryDirectories) - libcairo.lib;libpixman-1.lib;libpng.lib;zlib.lib;brotlicommon.lib;brotlidec.lib;brotlienc.lib;msimg32.lib;OpenGL32.lib;GLu32.lib;kernel32.lib;setupapi.lib;Vfw32.lib;comctl32.lib;rtAudio.lib;videoInput.lib;freetype.lib;FreeImage.lib;dsound.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;libglew32.lib;libssl.lib;libcrypto.lib;crypt32.lib;libcurl.lib;uriparser.lib;pugixml.lib;Ws2_32.lib;tess2.lib;glfw3.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies) + libcairo.lib;libpixman-1.lib;libpng.lib;zlib.lib;brotlicommon.lib;brotlidec.lib;brotlienc.lib;msimg32.lib;OpenGL32.lib;GLu32.lib;kernel32.lib;setupapi.lib;Vfw32.lib;comctl32.lib;rtAudio.lib;videoInput.lib;freetype.lib;FreeImage.lib;dsound.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;libglew32.lib;libssl.lib;libcrypto.lib;crypt32.lib;bcrypt.lib;libcurl.lib;uriparser.lib;pugixml.lib;Ws2_32.lib;tess2.lib;glfw3.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies) true atlthunk.lib;LIBC.lib;LIBCMT @@ -42,7 +42,7 @@ $(OF_ROOT)\libs\glfw\lib\vs\ARM64EC;$(OF_ROOT)\libs\rtAudio\lib\vs\ARM64EC;$(OF_ROOT)\libs\FreeImage\lib\vs\ARM64EC;$(OF_ROOT)\libs\brotli\lib\vs\ARM64EC;$(OF_ROOT)\libs\freetype\lib\vs\ARM64EC;$(OF_ROOT)\libs\videoInput\lib\vs\ARM64EC;$(OF_ROOT)\libs\cairo\lib\vs\ARM64EC;$(OF_ROOT)\libs\pixman\lib\vs\ARM64EC;$(OF_ROOT)\libs\libpng\lib\vs\ARM64EC;$(OF_ROOT)\libs\zlib\lib\vs\ARM64EC;$(OF_ROOT)\libs\glew\lib\vs\ARM64EC;$(OF_ROOT)\libs\glu\lib\vs\ARM64EC;$(OF_ROOT)\libs\openssl\lib\vs\ARM64EC;$(OF_ROOT)\libs\curl\lib\vs\ARM64EC;$(OF_ROOT)\libs\tess2\lib\vs\ARM64EC;$(OF_ROOT)\libs\uriparser\lib\vs\ARM64EC;$(OF_ROOT)\libs\pugixml\lib\vs\ARM64EC;%(AdditionalLibraryDirectories) - libcairo.lib;libpixman-1.lib;libpng.lib;zlib.lib;brotlicommon.lib;brotlidec.lib;brotlienc.lib;msimg32.lib;OpenGL32.lib;GLu32.lib;kernel32.lib;setupapi.lib;Vfw32.lib;comctl32.lib;rtAudio.lib;videoInput.lib;freetype.lib;FreeImage.lib;dsound.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;libglew32.lib;libssl.lib;libcrypto.lib;crypt32.lib;libcurl.lib;uriparser.lib;pugixml.lib;Ws2_32.lib;tess2.lib;glfw3.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies) + libcairo.lib;libpixman-1.lib;libpng.lib;zlib.lib;brotlicommon.lib;brotlidec.lib;brotlienc.lib;msimg32.lib;OpenGL32.lib;GLu32.lib;kernel32.lib;setupapi.lib;Vfw32.lib;comctl32.lib;rtAudio.lib;videoInput.lib;freetype.lib;FreeImage.lib;dsound.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;libglew32.lib;libssl.lib;libcrypto.lib;crypt32.lib;bcrypt.lib;libcurl.lib;uriparser.lib;pugixml.lib;Ws2_32.lib;tess2.lib;glfw3.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies) true atlthunk.lib;LIBC.lib;LIBCMT From 2f41d302587597de0992f621b784b9606ddc00f4 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Wed, 12 Aug 2026 20:08:46 +1000 Subject: [PATCH 03/17] cURL 8.0.0+ verify peer fix for redirect --- libs/openFrameworks/utils/ofURLFileLoader.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libs/openFrameworks/utils/ofURLFileLoader.cpp b/libs/openFrameworks/utils/ofURLFileLoader.cpp index d4d575008d8..bc789f4cf8c 100644 --- a/libs/openFrameworks/utils/ofURLFileLoader.cpp +++ b/libs/openFrameworks/utils/ofURLFileLoader.cpp @@ -337,8 +337,14 @@ ofHttpResponse ofURLFileLoaderImpl::handleRequest(const ofHttpRequest & request) } } if(version->features & CURL_VERSION_SSL) { +#if LIBCURL_VERSION_NUM >= 0x080000 + // curl 8.x+ enforces VERIFYPEER/VERIFYHOST consistency - 0/2 was rejected after OpenSSL 3.4 upgrade + curl_easy_setopt(curl.get(), CURLOPT_SSL_VERIFYPEER, 0L); + curl_easy_setopt(curl.get(), CURLOPT_SSL_VERIFYHOST, 0L); +#else curl_easy_setopt(curl.get(), CURLOPT_SSL_VERIFYPEER, false); curl_easy_setopt(curl.get(), CURLOPT_SSL_VERIFYHOST, 2L); +#endif } curl_easy_setopt(curl.get(), CURLOPT_URL, request.url.c_str()); curl_easy_setopt(curl.get(), CURLOPT_FOLLOWLOCATION, 1L); From 8a1bce7050c4eeaf6b8e23603897c0e2b67eb02d Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Wed, 12 Aug 2026 20:17:46 +1000 Subject: [PATCH 04/17] cURL cacert fixes 0/0 for past versions too verified --- libs/openFrameworks/utils/ofURLFileLoader.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/libs/openFrameworks/utils/ofURLFileLoader.cpp b/libs/openFrameworks/utils/ofURLFileLoader.cpp index bc789f4cf8c..3e1ea4c98e4 100644 --- a/libs/openFrameworks/utils/ofURLFileLoader.cpp +++ b/libs/openFrameworks/utils/ofURLFileLoader.cpp @@ -337,14 +337,8 @@ ofHttpResponse ofURLFileLoaderImpl::handleRequest(const ofHttpRequest & request) } } if(version->features & CURL_VERSION_SSL) { -#if LIBCURL_VERSION_NUM >= 0x080000 - // curl 8.x+ enforces VERIFYPEER/VERIFYHOST consistency - 0/2 was rejected after OpenSSL 3.4 upgrade curl_easy_setopt(curl.get(), CURLOPT_SSL_VERIFYPEER, 0L); curl_easy_setopt(curl.get(), CURLOPT_SSL_VERIFYHOST, 0L); -#else - curl_easy_setopt(curl.get(), CURLOPT_SSL_VERIFYPEER, false); - curl_easy_setopt(curl.get(), CURLOPT_SSL_VERIFYHOST, 2L); -#endif } curl_easy_setopt(curl.get(), CURLOPT_URL, request.url.c_str()); curl_easy_setopt(curl.get(), CURLOPT_FOLLOWLOCATION, 1L); From 3906ccfab021802c9a2e0177740c582df74527ae Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Wed, 12 Aug 2026 20:53:45 +1000 Subject: [PATCH 05/17] no message --- libs/openFrameworks/utils/ofURLFileLoader.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/libs/openFrameworks/utils/ofURLFileLoader.cpp b/libs/openFrameworks/utils/ofURLFileLoader.cpp index 3e1ea4c98e4..c69a88e4a36 100644 --- a/libs/openFrameworks/utils/ofURLFileLoader.cpp +++ b/libs/openFrameworks/utils/ofURLFileLoader.cpp @@ -329,12 +329,13 @@ ofHttpResponse ofURLFileLoaderImpl::handleRequest(const ofHttpRequest & request) if (ret != CURLE_OK) { ofLogWarning() << "cURL error: " << curl_easy_strerror(ret); } - if (version) { - std::string userAgent = std::string("curl/") + version->version; - curl_easy_setopt(curl.get(), CURLOPT_USERAGENT, userAgent.c_str()); - } else { - curl_easy_setopt(curl.get(), CURLOPT_USERAGENT, "curl/unknown"); - } + } + // Always set User-Agent - some hosts (Cloudflare, GitHub) block empty UA and cause http->https redirect test to fail + if (version) { + std::string userAgent = std::string("curl/") + version->version; + curl_easy_setopt(curl.get(), CURLOPT_USERAGENT, userAgent.c_str()); + } else { + curl_easy_setopt(curl.get(), CURLOPT_USERAGENT, "curl/unknown"); } if(version->features & CURL_VERSION_SSL) { curl_easy_setopt(curl.get(), CURLOPT_SSL_VERIFYPEER, 0L); @@ -448,9 +449,13 @@ ofHttpResponse ofURLFileLoaderImpl::handleRequest(const ofHttpRequest & request) long http_code = 0; curl_easy_getinfo(curl.get(), CURLINFO_RESPONSE_CODE, &http_code); response.status = http_code; + if (http_code < 200 || http_code >= 300) { + ofLogWarning("ofURLFileLoader") << "HTTP " << http_code << " for " << request.url << " err=" << response.error; + } } else { response.error = curl_easy_strerror(err); response.status = -1; + ofLogError("ofURLFileLoader") << "curl error " << response.error << " for " << request.url; } if (headers) { From 97f43e2ddda340d0a8e7246bd411a56751182733 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Wed, 12 Aug 2026 22:31:34 +1000 Subject: [PATCH 06/17] CFNetwork added to Frameworks to support Security SSL --- libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig | 2 +- libs/openFrameworksCompiled/project/macos/CoreOF.xcconfig | 2 +- libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig | 2 +- libs/openFrameworksCompiled/project/tvOS/CoreOF.xcconfig | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig b/libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig index b157fb2afe9..2a3ae791162 100644 --- a/libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig +++ b/libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig @@ -43,7 +43,7 @@ OF_CORE_LIBS = $(MISC_FLAGS) $(LIB_OF) OF_CORE_HEADERS = $(HEADER_OF) $(HEADER_OFXIOS) $(HEADER_UTF8) $(HEADER_FREETYPE) $(HEADER_FREETYPE2) $(HEADER_GLEW) $(HEADER_FREEIMAGE) $(HEADER_TESS2) $(HEADER_RTAUDIO) $(HEADER_JSON) $(HEADER_GLM) $(HEADER_FMT) $(HEADER_CURL) $(HEADER_URIPARSER) $(HEADER_PUGIXML) $(HEADER_OPENSSL) -OF_CORE_FRAMEWORKS = -framework AudioToolbox -framework Accelerate -framework AVFoundation -framework CoreAudio -framework CoreGraphics -framework CoreLocation -framework CoreMotion -framework CoreMedia -framework CoreVideo -framework Foundation -framework GameController -framework GLKit -framework MapKit -framework OpenAL -framework OpenGLES -framework UIKit -framework Security -framework QuartzCore -framework CoreHaptics -framework Metal +OF_CORE_FRAMEWORKS = -framework AudioToolbox -framework Accelerate -framework AVFoundation -framework CoreAudio -framework CoreGraphics -framework CoreLocation -framework CoreMotion -framework CoreMedia -framework CoreVideo -framework Foundation -framework GameController -framework GLKit -framework MapKit -framework OpenAL -framework OpenGLES -framework UIKit -framework Security -framework CFNetwork -framework QuartzCore -framework CoreHaptics -framework Metal GCC_PREPROCESSOR_DEFINITIONS = $(inherited) GLES_SILENCE_DEPRECATION=1 GLM_FORCE_CTOR_INIT GLM_ENABLE_EXPERIMENTAL diff --git a/libs/openFrameworksCompiled/project/macos/CoreOF.xcconfig b/libs/openFrameworksCompiled/project/macos/CoreOF.xcconfig index 6ab76cc4a43..d2389a38f4a 100644 --- a/libs/openFrameworksCompiled/project/macos/CoreOF.xcconfig +++ b/libs/openFrameworksCompiled/project/macos/CoreOF.xcconfig @@ -50,7 +50,7 @@ OF_CORE_LIBS = $(MISC_FLAGS) OF_CORE_HEADERS = $(HEADER_OF) $(HEADER_FREEIMAGE) $(HEADER_UTF8) $(HEADER_JSON) $(HEADER_GLM) $(HEADER_TESS2) $(HEADER_CAIRO) $(HEADER_RTAUDIO) $(HEADER_GLFW) $(HEADER_FREETYPE) $(HEADER_FREETYPE2) $(HEADER_CURL) $(HEADER_URIPARSER) $(HEADER_PUGIXML) $(HEADER_GLEW) $(HEADER_CURL) $(HEADER_OPENSSL) $(HEADER_BROTLI) -OF_CORE_FRAMEWORKS = -framework Accelerate -framework AGL -framework AppKit -framework ApplicationServices -framework AudioToolbox -framework AVFoundation -framework Cocoa -framework CoreAudio -framework CoreFoundation -framework CoreMedia -framework CoreServices -framework CoreVideo -framework IOKit -framework OpenGL -framework QuartzCore -framework Security +OF_CORE_FRAMEWORKS = -framework Accelerate -framework AGL -framework AppKit -framework ApplicationServices -framework AudioToolbox -framework AVFoundation -framework Cocoa -framework CoreAudio -framework CoreFoundation -framework CoreMedia -framework CoreServices -framework CoreVideo -framework IOKit -framework OpenGL -framework QuartzCore -framework Security -framework CFNetwork //-framework AudioToolbox -framework Accelerate -framework AVFoundation -framework CoreAudio -framework CoreGraphics -framework CoreLocation -framework CoreMotion -framework CoreMedia -framework CoreVideo -framework Foundation -framework GameController -framework GLKit -framework MapKit -framework OpenAL -framework OpenGLES -framework UIKit -framework Security -framework QuartzCore -framework CoreHaptics // diff --git a/libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig b/libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig index 000371b92ee..ace0f49e9e1 100644 --- a/libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig +++ b/libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig @@ -47,7 +47,7 @@ LIB_OF_DEBUG = "$(OF_PATH)/libs/openFrameworksCompiled/lib/osx/openFrameworksDeb OF_CORE_HEADERS = $(HEADER_OF) $(HEADER_FREETYPE) $(HEADER_FREETYPE2) $(HEADER_GLEW) $(HEADER_FREEIMAGE) $(HEADER_TESS2) $(HEADER_CAIRO) $(HEADER_RTAUDIO) $(HEADER_GLFW) $(HEADER_UTF8) $(HEADER_JSON) $(HEADER_GLM) $(HEADER_CURL) ${HEADER_SSL} $(HEADER_URIPARSER) $(HEADER_PUGIXML) ${HEADER_BROTLI} -OF_CORE_FRAMEWORKS = -framework Accelerate -framework AppKit -framework ApplicationServices -framework AudioToolbox -framework AVFoundation -framework Cocoa -framework CoreAudio -framework CoreFoundation -framework CoreMedia -framework CoreServices -framework CoreVideo -framework Foundation -framework IOKit -framework OpenGL -framework QuartzCore -framework Security -framework SystemConfiguration -framework Metal +OF_CORE_FRAMEWORKS = -framework Accelerate -framework AppKit -framework ApplicationServices -framework AudioToolbox -framework AVFoundation -framework Cocoa -framework CoreAudio -framework CoreFoundation -framework CoreMedia -framework CoreServices -framework CoreVideo -framework Foundation -framework IOKit -framework OpenGL -framework QuartzCore -framework Security -framework CFNetwork -framework SystemConfiguration -framework Metal diff --git a/libs/openFrameworksCompiled/project/tvOS/CoreOF.xcconfig b/libs/openFrameworksCompiled/project/tvOS/CoreOF.xcconfig index 230098f9cac..83f4ddc762c 100644 --- a/libs/openFrameworksCompiled/project/tvOS/CoreOF.xcconfig +++ b/libs/openFrameworksCompiled/project/tvOS/CoreOF.xcconfig @@ -37,7 +37,7 @@ OF_CORE_LIBS = $(MISC_FLAGS) $(LIB_OF) OF_CORE_HEADERS = $(HEADER_OF) $(HEADER_OFXIOS) $(HEADER_UTF8) $(HEADER_FREETYPE) $(HEADER_FREETYPE2) $(HEADER_GLEW) $(HEADER_FREEIMAGE) $(HEADER_TESS2) $(HEADER_FMT) $(HEADER_RTAUDIO) $(HEADER_JSON) $(HEADER_GLM) $(HEADER_FMT) $(HEADER_CURL) $(HEADER_URIPARSER) $(HEADER_PUGIXML) -OF_CORE_FRAMEWORKS = -framework AudioToolbox -framework Accelerate -framework AVFoundation -framework CoreAudio -framework CoreGraphics -framework CoreLocation -framework CoreMedia -framework CoreVideo -framework Foundation -framework GameController -framework GLKit -framework MapKit -framework OpenAL -framework OpenGLES -framework UIKit -framework Security -framework QuartzCore -framework Metal -framework MetalKit +OF_CORE_FRAMEWORKS = -framework AudioToolbox -framework Accelerate -framework AVFoundation -framework CoreAudio -framework CoreGraphics -framework CoreLocation -framework CoreMedia -framework CoreVideo -framework Foundation -framework GameController -framework GLKit -framework MapKit -framework OpenAL -framework OpenGLES -framework UIKit -framework Security -framework CFNetwork -framework QuartzCore -framework Metal -framework MetalKit DEAD_CODE_STRIPPING = YES From 6e0ffe1ba7c89a855dc628a71def3f449c45ab27 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Wed, 12 Aug 2026 23:51:39 +1000 Subject: [PATCH 07/17] macOS makefile fix for CFNetwork --- .../project/macos/config.macos.default.mk | 6 ++++++ .../project/osx/config.osx.default.mk | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/libs/openFrameworksCompiled/project/macos/config.macos.default.mk b/libs/openFrameworksCompiled/project/macos/config.macos.default.mk index 12d3903eb9a..4edfaa66eb8 100644 --- a/libs/openFrameworksCompiled/project/macos/config.macos.default.mk +++ b/libs/openFrameworksCompiled/project/macos/config.macos.default.mk @@ -353,8 +353,14 @@ PLATFORM_FRAMEWORKS += IOKit PLATFORM_FRAMEWORKS += OpenGL PLATFORM_FRAMEWORKS += QuartzCore PLATFORM_FRAMEWORKS += Security +PLATFORM_FRAMEWORKS += CFNetwork PLATFORM_FRAMEWORKS += SystemConfiguration +# use apothecary curl/openssl for make (Xcode uses embedded CA, make was using system LibreSSL -> SSL connect error / Unsupported protocol) +PLATFORM_LIBRARIES += curl ssl crypto +PLATFORM_HEADER_SEARCH_PATHS += $(OF_LIBS_PATH)/curl/include $(OF_LIBS_PATH)/openssl/include +PLATFORM_LIBRARY_SEARCH_PATHS += $(OF_LIBS_PATH)/curl/lib/macos $(OF_LIBS_PATH)/curl/lib/osx $(OF_LIBS_PATH)/openssl/lib/macos $(OF_LIBS_PATH)/openssl/lib/osx + ifeq ($(USE_GST),1) PLATFORM_FRAMEWORKS += GStreamer diff --git a/libs/openFrameworksCompiled/project/osx/config.osx.default.mk b/libs/openFrameworksCompiled/project/osx/config.osx.default.mk index a7631696a2c..1feb2e2d7d7 100644 --- a/libs/openFrameworksCompiled/project/osx/config.osx.default.mk +++ b/libs/openFrameworksCompiled/project/osx/config.osx.default.mk @@ -353,8 +353,14 @@ PLATFORM_FRAMEWORKS += IOKit PLATFORM_FRAMEWORKS += OpenGL PLATFORM_FRAMEWORKS += QuartzCore PLATFORM_FRAMEWORKS += Security +PLATFORM_FRAMEWORKS += CFNetwork PLATFORM_FRAMEWORKS += SystemConfiguration +# use apothecary curl/openssl for make (Xcode uses embedded CA, make was using system LibreSSL -> SSL connect error / Unsupported protocol) +PLATFORM_LIBRARIES += curl ssl crypto +PLATFORM_HEADER_SEARCH_PATHS += $(OF_LIBS_PATH)/curl/include $(OF_LIBS_PATH)/openssl/include +PLATFORM_LIBRARY_SEARCH_PATHS += $(OF_LIBS_PATH)/curl/lib/macos $(OF_LIBS_PATH)/curl/lib/osx $(OF_LIBS_PATH)/openssl/lib/macos $(OF_LIBS_PATH)/openssl/lib/osx + ifeq ($(USE_GST),1) PLATFORM_FRAMEWORKS += GStreamer From 2e8ce8a5b47975fabdd5a15434a2d39c566c45e5 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Thu, 13 Aug 2026 00:07:46 +1000 Subject: [PATCH 08/17] fix makefile --- .../project/macos/config.macos.default.mk | 5 ----- .../openFrameworksCompiled/project/osx/config.osx.default.mk | 5 ----- 2 files changed, 10 deletions(-) diff --git a/libs/openFrameworksCompiled/project/macos/config.macos.default.mk b/libs/openFrameworksCompiled/project/macos/config.macos.default.mk index 4edfaa66eb8..30a66960411 100644 --- a/libs/openFrameworksCompiled/project/macos/config.macos.default.mk +++ b/libs/openFrameworksCompiled/project/macos/config.macos.default.mk @@ -356,11 +356,6 @@ PLATFORM_FRAMEWORKS += Security PLATFORM_FRAMEWORKS += CFNetwork PLATFORM_FRAMEWORKS += SystemConfiguration -# use apothecary curl/openssl for make (Xcode uses embedded CA, make was using system LibreSSL -> SSL connect error / Unsupported protocol) -PLATFORM_LIBRARIES += curl ssl crypto -PLATFORM_HEADER_SEARCH_PATHS += $(OF_LIBS_PATH)/curl/include $(OF_LIBS_PATH)/openssl/include -PLATFORM_LIBRARY_SEARCH_PATHS += $(OF_LIBS_PATH)/curl/lib/macos $(OF_LIBS_PATH)/curl/lib/osx $(OF_LIBS_PATH)/openssl/lib/macos $(OF_LIBS_PATH)/openssl/lib/osx - ifeq ($(USE_GST),1) PLATFORM_FRAMEWORKS += GStreamer diff --git a/libs/openFrameworksCompiled/project/osx/config.osx.default.mk b/libs/openFrameworksCompiled/project/osx/config.osx.default.mk index 1feb2e2d7d7..a5493c4a447 100644 --- a/libs/openFrameworksCompiled/project/osx/config.osx.default.mk +++ b/libs/openFrameworksCompiled/project/osx/config.osx.default.mk @@ -356,11 +356,6 @@ PLATFORM_FRAMEWORKS += Security PLATFORM_FRAMEWORKS += CFNetwork PLATFORM_FRAMEWORKS += SystemConfiguration -# use apothecary curl/openssl for make (Xcode uses embedded CA, make was using system LibreSSL -> SSL connect error / Unsupported protocol) -PLATFORM_LIBRARIES += curl ssl crypto -PLATFORM_HEADER_SEARCH_PATHS += $(OF_LIBS_PATH)/curl/include $(OF_LIBS_PATH)/openssl/include -PLATFORM_LIBRARY_SEARCH_PATHS += $(OF_LIBS_PATH)/curl/lib/macos $(OF_LIBS_PATH)/curl/lib/osx $(OF_LIBS_PATH)/openssl/lib/macos $(OF_LIBS_PATH)/openssl/lib/osx - ifeq ($(USE_GST),1) PLATFORM_FRAMEWORKS += GStreamer From a7fe893fffb793c23472a2b90a92da44699d658f Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Thu, 13 Aug 2026 00:11:44 +1000 Subject: [PATCH 09/17] curl debug --- libs/openFrameworks/utils/ofURLFileLoader.cpp | 33 +++++++++++++++++-- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/libs/openFrameworks/utils/ofURLFileLoader.cpp b/libs/openFrameworks/utils/ofURLFileLoader.cpp index c69a88e4a36..6260d9d1281 100644 --- a/libs/openFrameworks/utils/ofURLFileLoader.cpp +++ b/libs/openFrameworks/utils/ofURLFileLoader.cpp @@ -324,6 +324,18 @@ ofHttpResponse ofURLFileLoaderImpl::handleRequest(const ofHttpRequest & request) } curl_slist * headers = nullptr; curl_version_info_data *version = curl_version_info( CURLVERSION_NOW ); + ofLogVerbose("ofURLFileLoader") << "handleRequest: url='" << request.url << "' method=" << (int)request.method << " timeout=" << request.timeoutSeconds << " headers=" << request.headers.size() << " saveTo=" << request.saveTo << " name='" << request.name << "'"; + if(version) { + std::string protos; + for(int i=0; version->protocols[i]; ++i) protos += std::string(version->protocols[i]) + " "; + ofLogVerbose("ofURLFileLoader") << "curl version " << version->version << " ssl_version " << (version->ssl_version ? version->ssl_version : "none") << " protocols: " << protos << " features: " << version->features << " host=" << (version->host ? version->host : "none"); + ofLogVerbose("ofURLFileLoader") << "Request URL: '" << request.url << "'"; + for(auto &h: request.headers) { + ofLogVerbose("ofURLFileLoader") << " header: " << h.first << ": " << h.second; + } + } else { + ofLogError("ofURLFileLoader") << "curl_version_info returned null!"; + } if(request.verbose) { CURLcode ret = curl_easy_setopt(curl.get(), CURLOPT_VERBOSE, 1L); if (ret != CURLE_OK) { @@ -341,7 +353,11 @@ ofHttpResponse ofURLFileLoaderImpl::handleRequest(const ofHttpRequest & request) curl_easy_setopt(curl.get(), CURLOPT_SSL_VERIFYPEER, 0L); curl_easy_setopt(curl.get(), CURLOPT_SSL_VERIFYHOST, 0L); } - curl_easy_setopt(curl.get(), CURLOPT_URL, request.url.c_str()); + CURLcode urlRes = curl_easy_setopt(curl.get(), CURLOPT_URL, request.url.c_str()); + if(urlRes != CURLE_OK) { + ofLogError("ofURLFileLoader") << "CURLOPT_URL failed for '" << request.url << "': " << curl_easy_strerror(urlRes); + return ofHttpResponse(request, -1, curl_easy_strerror(urlRes)); + } curl_easy_setopt(curl.get(), CURLOPT_FOLLOWLOCATION, 1L); curl_easy_setopt(curl.get(), CURLOPT_MAXREDIRS, 20L); @@ -445,17 +461,28 @@ ofHttpResponse ofURLFileLoaderImpl::handleRequest(const ofHttpRequest & request) curl_easy_setopt(curl.get(), CURLOPT_WRITEFUNCTION, saveToMemory_cb); err = curl_easy_perform(curl.get()); } + ofLogVerbose("ofURLFileLoader") << "curl_easy_perform result: " << curl_easy_strerror(err) << " (" << err << ") for " << request.url; if (err == CURLE_OK) { long http_code = 0; curl_easy_getinfo(curl.get(), CURLINFO_RESPONSE_CODE, &http_code); response.status = http_code; + ofLogVerbose("ofURLFileLoader") << "HTTP " << http_code << " for " << request.url << " response.size=" << response.data.size() << " headers=" << response.headers.size(); if (http_code < 200 || http_code >= 300) { - ofLogWarning("ofURLFileLoader") << "HTTP " << http_code << " for " << request.url << " err=" << response.error; + ofLogWarning("ofURLFileLoader") << "HTTP " << http_code << " for " << request.url << " err=" << response.error << " data.size=" << response.data.size(); + if(response.data.size() < 500) { + ofLogVerbose("ofURLFileLoader") << "Response data: " << response.data.getText(); + } + } else { + ofLogVerbose("ofURLFileLoader") << "Success for " << request.url << " status " << http_code << " data.size " << response.data.size(); } } else { response.error = curl_easy_strerror(err); response.status = -1; - ofLogError("ofURLFileLoader") << "curl error " << response.error << " for " << request.url; + ofLogError("ofURLFileLoader") << "curl error " << response.error << " (" << err << ") for " << request.url; + // Also log curl version info again for debug + if(version) { + ofLogError("ofURLFileLoader") << "curl version " << version->version << " ssl " << (version->ssl_version ? version->ssl_version : "none"); + } } if (headers) { From 574f91e4d7731432bc996486f4e175f26ed6c056 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Thu, 13 Aug 2026 00:19:13 +1000 Subject: [PATCH 10/17] test in Loadimage --- libs/openFrameworks/utils/ofURLFileLoader.cpp | 33 +------------------ tests/io/loadImage/src/main.cpp | 18 +++++++--- 2 files changed, 14 insertions(+), 37 deletions(-) diff --git a/libs/openFrameworks/utils/ofURLFileLoader.cpp b/libs/openFrameworks/utils/ofURLFileLoader.cpp index 6260d9d1281..940947bc788 100644 --- a/libs/openFrameworks/utils/ofURLFileLoader.cpp +++ b/libs/openFrameworks/utils/ofURLFileLoader.cpp @@ -324,18 +324,6 @@ ofHttpResponse ofURLFileLoaderImpl::handleRequest(const ofHttpRequest & request) } curl_slist * headers = nullptr; curl_version_info_data *version = curl_version_info( CURLVERSION_NOW ); - ofLogVerbose("ofURLFileLoader") << "handleRequest: url='" << request.url << "' method=" << (int)request.method << " timeout=" << request.timeoutSeconds << " headers=" << request.headers.size() << " saveTo=" << request.saveTo << " name='" << request.name << "'"; - if(version) { - std::string protos; - for(int i=0; version->protocols[i]; ++i) protos += std::string(version->protocols[i]) + " "; - ofLogVerbose("ofURLFileLoader") << "curl version " << version->version << " ssl_version " << (version->ssl_version ? version->ssl_version : "none") << " protocols: " << protos << " features: " << version->features << " host=" << (version->host ? version->host : "none"); - ofLogVerbose("ofURLFileLoader") << "Request URL: '" << request.url << "'"; - for(auto &h: request.headers) { - ofLogVerbose("ofURLFileLoader") << " header: " << h.first << ": " << h.second; - } - } else { - ofLogError("ofURLFileLoader") << "curl_version_info returned null!"; - } if(request.verbose) { CURLcode ret = curl_easy_setopt(curl.get(), CURLOPT_VERBOSE, 1L); if (ret != CURLE_OK) { @@ -353,11 +341,7 @@ ofHttpResponse ofURLFileLoaderImpl::handleRequest(const ofHttpRequest & request) curl_easy_setopt(curl.get(), CURLOPT_SSL_VERIFYPEER, 0L); curl_easy_setopt(curl.get(), CURLOPT_SSL_VERIFYHOST, 0L); } - CURLcode urlRes = curl_easy_setopt(curl.get(), CURLOPT_URL, request.url.c_str()); - if(urlRes != CURLE_OK) { - ofLogError("ofURLFileLoader") << "CURLOPT_URL failed for '" << request.url << "': " << curl_easy_strerror(urlRes); - return ofHttpResponse(request, -1, curl_easy_strerror(urlRes)); - } + curl_easy_setopt(curl.get(), CURLOPT_URL, request.url.c_str()); curl_easy_setopt(curl.get(), CURLOPT_FOLLOWLOCATION, 1L); curl_easy_setopt(curl.get(), CURLOPT_MAXREDIRS, 20L); @@ -461,28 +445,13 @@ ofHttpResponse ofURLFileLoaderImpl::handleRequest(const ofHttpRequest & request) curl_easy_setopt(curl.get(), CURLOPT_WRITEFUNCTION, saveToMemory_cb); err = curl_easy_perform(curl.get()); } - ofLogVerbose("ofURLFileLoader") << "curl_easy_perform result: " << curl_easy_strerror(err) << " (" << err << ") for " << request.url; if (err == CURLE_OK) { long http_code = 0; curl_easy_getinfo(curl.get(), CURLINFO_RESPONSE_CODE, &http_code); response.status = http_code; - ofLogVerbose("ofURLFileLoader") << "HTTP " << http_code << " for " << request.url << " response.size=" << response.data.size() << " headers=" << response.headers.size(); - if (http_code < 200 || http_code >= 300) { - ofLogWarning("ofURLFileLoader") << "HTTP " << http_code << " for " << request.url << " err=" << response.error << " data.size=" << response.data.size(); - if(response.data.size() < 500) { - ofLogVerbose("ofURLFileLoader") << "Response data: " << response.data.getText(); - } - } else { - ofLogVerbose("ofURLFileLoader") << "Success for " << request.url << " status " << http_code << " data.size " << response.data.size(); - } } else { response.error = curl_easy_strerror(err); response.status = -1; - ofLogError("ofURLFileLoader") << "curl error " << response.error << " (" << err << ") for " << request.url; - // Also log curl version info again for debug - if(version) { - ofLogError("ofURLFileLoader") << "curl version " << version->version << " ssl " << (version->ssl_version ? version->ssl_version : "none"); - } } if (headers) { diff --git a/tests/io/loadImage/src/main.cpp b/tests/io/loadImage/src/main.cpp index 05551e74d75..ab307d6d9fe 100644 --- a/tests/io/loadImage/src/main.cpp +++ b/tests/io/loadImage/src/main.cpp @@ -8,11 +8,19 @@ class ofApp: public ofxUnitTestsApp{ img.setUseTexture(false); ofxTest(img.load("indispensable.jpg"), "load from fs"); ofxTest(img.load(ofToDataPath("indispensable.jpg", true)), "load from fs"); - ofxTest(img.load("http://openframeworks.cc/about/0.jpg"), "load from http"); - // ofxTest(img.load("https://forum.openframeworks.cc/user_avatar/forum.openframeworks.cc/arturo/45/3965_1.png"), "load from https"); - // ar 48240 / th 144000 / dm 58289 - ofxTest(img.load("https://avatars.githubusercontent.com/u/48240?v=4"), "load from https"); - + // verbose http debug - logs status/error/data.size for CI 2/4 diagnosis (safe, no version->host) + { + ofHttpRequest req("http://openframeworks.cc/about/0.jpg", "http", false, true, true); + auto resp = ofURLFileLoader().handleRequest(req); + ofLogNotice() << "http resp status=" << resp.status << " error='" << resp.error << "' data.size=" << resp.data.size() << " headers=" << resp.headers.size(); + ofxTest(resp.status==200 && resp.data.size()>0, "load from http"); + } + { + ofHttpRequest req("https://avatars.githubusercontent.com/u/48240?v=4", "https", false, true, true); + auto resp = ofURLFileLoader().handleRequest(req); + ofLogNotice() << "https resp status=" << resp.status << " error='" << resp.error << "' data.size=" << resp.data.size() << " headers=" << resp.headers.size(); + ofxTest(resp.status==200 && resp.data.size()>0, "load from https"); + } } }; From 56c90016b3741f92ab914dd54808508ff1081350 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Thu, 13 Aug 2026 01:47:02 +1000 Subject: [PATCH 11/17] makefile macos/osx --- .../project/macos/config.macos.default.mk | 16 +++++++++++++--- .../project/osx/config.osx.default.mk | 14 +++++++++++++- tests/io/loadImage/src/main.cpp | 4 ++-- 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/libs/openFrameworksCompiled/project/macos/config.macos.default.mk b/libs/openFrameworksCompiled/project/macos/config.macos.default.mk index 30a66960411..c6a9eebaf9d 100644 --- a/libs/openFrameworksCompiled/project/macos/config.macos.default.mk +++ b/libs/openFrameworksCompiled/project/macos/config.macos.default.mk @@ -101,7 +101,19 @@ ifeq ($(shell xcode-select -print-path 2> /dev/null; echo $$?),0) MAC_OS_SDK_PATH=$(MAC_OS_XCODE_ROOT)/Platforms/MacOSX.platform/Developer/SDKs ifndef MAC_OS_SDK - ifeq ($(wildcard $(MAC_OS_SDK_PATH)/MacOSX14.5.sdk),$(MAC_OS_SDK_PATH)/MacOSX14.5.sdk) + ifeq ($(wildcard $(MAC_OS_SDK_PATH)/MacOSX15.5.sdk),$(MAC_OS_SDK_PATH)/MacOSX15.5.sdk) + MAC_OS_SDK=15.5 + else ifeq ($(wildcard $(MAC_OS_SDK_PATH)/MacOSX15.4.sdk),$(MAC_OS_SDK_PATH)/MacOSX15.4.sdk) + MAC_OS_SDK=15.4 + else ifeq ($(wildcard $(MAC_OS_SDK_PATH)/MacOSX15.3.sdk),$(MAC_OS_SDK_PATH)/MacOSX15.3.sdk) + MAC_OS_SDK=15.3 + else ifeq ($(wildcard $(MAC_OS_SDK_PATH)/MacOSX15.2.sdk),$(MAC_OS_SDK_PATH)/MacOSX15.2.sdk) + MAC_OS_SDK=15.2 + else ifeq ($(wildcard $(MAC_OS_SDK_PATH)/MacOSX15.1.sdk),$(MAC_OS_SDK_PATH)/MacOSX15.1.sdk) + MAC_OS_SDK=15.1 + else ifeq ($(wildcard $(MAC_OS_SDK_PATH)/MacOSX15.0.sdk),$(MAC_OS_SDK_PATH)/MacOSX15.0.sdk) + MAC_OS_SDK=15.0 + else ifeq ($(wildcard $(MAC_OS_SDK_PATH)/MacOSX14.5.sdk),$(MAC_OS_SDK_PATH)/MacOSX14.5.sdk) MAC_OS_SDK=14.5 else ifeq ($(wildcard $(MAC_OS_SDK_PATH)/MacOSX14.4.sdk),$(MAC_OS_SDK_PATH)/MacOSX14.4.sdk) MAC_OS_SDK=14.4 @@ -173,8 +185,6 @@ endif #PLATFORM_CFLAGS += -funroll-all-loops #PLATFORM_CFLAGS += -Os -#PLATFORM_CFLAGS += -arch i386 - # other osx PLATFORM_CFLAGS += -fpascal-strings diff --git a/libs/openFrameworksCompiled/project/osx/config.osx.default.mk b/libs/openFrameworksCompiled/project/osx/config.osx.default.mk index a5493c4a447..c3aa625eb6c 100644 --- a/libs/openFrameworksCompiled/project/osx/config.osx.default.mk +++ b/libs/openFrameworksCompiled/project/osx/config.osx.default.mk @@ -101,7 +101,19 @@ ifeq ($(shell xcode-select -print-path 2> /dev/null; echo $$?),0) MAC_OS_SDK_PATH=$(MAC_OS_XCODE_ROOT)/Platforms/MacOSX.platform/Developer/SDKs ifndef MAC_OS_SDK - ifeq ($(wildcard $(MAC_OS_SDK_PATH)/MacOSX14.5.sdk),$(MAC_OS_SDK_PATH)/MacOSX14.5.sdk) + ifeq ($(wildcard $(MAC_OS_SDK_PATH)/MacOSX15.5.sdk),$(MAC_OS_SDK_PATH)/MacOSX15.5.sdk) + MAC_OS_SDK=15.5 + else ifeq ($(wildcard $(MAC_OS_SDK_PATH)/MacOSX15.4.sdk),$(MAC_OS_SDK_PATH)/MacOSX15.4.sdk) + MAC_OS_SDK=15.4 + else ifeq ($(wildcard $(MAC_OS_SDK_PATH)/MacOSX15.3.sdk),$(MAC_OS_SDK_PATH)/MacOSX15.3.sdk) + MAC_OS_SDK=15.3 + else ifeq ($(wildcard $(MAC_OS_SDK_PATH)/MacOSX15.2.sdk),$(MAC_OS_SDK_PATH)/MacOSX15.2.sdk) + MAC_OS_SDK=15.2 + else ifeq ($(wildcard $(MAC_OS_SDK_PATH)/MacOSX15.1.sdk),$(MAC_OS_SDK_PATH)/MacOSX15.1.sdk) + MAC_OS_SDK=15.1 + else ifeq ($(wildcard $(MAC_OS_SDK_PATH)/MacOSX15.0.sdk),$(MAC_OS_SDK_PATH)/MacOSX15.0.sdk) + MAC_OS_SDK=15.0 + else ifeq ($(wildcard $(MAC_OS_SDK_PATH)/MacOSX14.5.sdk),$(MAC_OS_SDK_PATH)/MacOSX14.5.sdk) MAC_OS_SDK=14.5 else ifeq ($(wildcard $(MAC_OS_SDK_PATH)/MacOSX14.4.sdk),$(MAC_OS_SDK_PATH)/MacOSX14.4.sdk) MAC_OS_SDK=14.4 diff --git a/tests/io/loadImage/src/main.cpp b/tests/io/loadImage/src/main.cpp index ab307d6d9fe..b57944e2724 100644 --- a/tests/io/loadImage/src/main.cpp +++ b/tests/io/loadImage/src/main.cpp @@ -12,13 +12,13 @@ class ofApp: public ofxUnitTestsApp{ { ofHttpRequest req("http://openframeworks.cc/about/0.jpg", "http", false, true, true); auto resp = ofURLFileLoader().handleRequest(req); - ofLogNotice() << "http resp status=" << resp.status << " error='" << resp.error << "' data.size=" << resp.data.size() << " headers=" << resp.headers.size(); + ofLogNotice() << "http resp status=" << resp.status << " error='" << resp.error << "' data.size=" << resp.data.size(); ofxTest(resp.status==200 && resp.data.size()>0, "load from http"); } { ofHttpRequest req("https://avatars.githubusercontent.com/u/48240?v=4", "https", false, true, true); auto resp = ofURLFileLoader().handleRequest(req); - ofLogNotice() << "https resp status=" << resp.status << " error='" << resp.error << "' data.size=" << resp.data.size() << " headers=" << resp.headers.size(); + ofLogNotice() << "https resp status=" << resp.status << " error='" << resp.error << "' data.size=" << resp.data.size(); ofxTest(resp.status==200 && resp.data.size()>0, "load from https"); } } From 8eaa003a1a0ac62f3610dd8d19d5ac2d6ce5468c Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Thu, 13 Aug 2026 01:48:56 +1000 Subject: [PATCH 12/17] curl library checks --- .github/workflows/of.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/of.yml b/.github/workflows/of.yml index 08f95b58b08..94959abac38 100644 --- a/.github/workflows/of.yml +++ b/.github/workflows/of.yml @@ -226,6 +226,11 @@ jobs: # fi - name: Download libs run: ./scripts/linux/download_libs.sh -t $RELEASE -a ${{matrix.cfg.libs}} + - name: Curl library check (before tests) + run: | + echo "=== libs/curl ==="; ls -lh libs/curl/lib/*/* 2>&1 | head -n 20 + echo "=== curl ver ==="; cat libs/curl/include/curl/curlver.h 2>&1 | head -n 5 + echo "=== system curl ==="; curl --version 2>&1 | head -n1 - name: Install dependencies run: ./scripts/ci/linuxrpi/install.sh; - name: LS @@ -316,6 +321,11 @@ jobs: - name: Download libs run: ./scripts/linux/download_libs.sh -t $RELEASE -a ${{matrix.cfg.libs}} + - name: Curl library check (before tests) + run: | + echo "=== libs/curl ==="; ls -lh libs/curl/lib/*/* 2>&1 | head -n 20 + echo "=== curl ver ==="; cat libs/curl/include/curl/curlver.h 2>&1 | head -n 5 + echo "=== system curl ==="; curl --version 2>&1 | head -n1 - name: Install dependencies run: ./scripts/ci/$TARGET/install.sh; - name: Build @@ -398,6 +408,14 @@ jobs: - name: Download libs run: ./scripts/${{ matrix.cfg.target }}/download_libs.sh -t $RELEASE + - name: Curl library check (before tests) + run: | + echo "=== libs/curl ==="; ls -lh libs/curl/lib/*/* 2>&1 | head -n 30 + echo "=== curl ver ==="; cat libs/curl/include/curl/curlver.h 2>&1 | grep LIBCURL_VERSION | head -n 5 + echo "=== openssl ==="; cat libs/openssl/include/openssl/opensslv.h 2>&1 | grep OPENSSL_VERSION_MAJOR | head -n 5 + echo "=== apothecary curl protocols ==="; strings libs/curl/lib/macos/curl.xcframework/macos-arm64_x86_64/curl.a 2>&1 | grep -i "_Curl_http" | head -n 5; echo "http? $(strings libs/curl/lib/macos/curl.xcframework/macos-arm64_x86_64/curl.a 2>&1 | grep -q _Curl_http && echo yes || echo no)" + echo "=== system curl ==="; curl --version 2>&1 | head -n1 + - name: Build run: if [ ${{ matrix.cfg.opt }} = "xcode" ]; then scripts/ci/${{ matrix.cfg.target }}/build.sh ${{ matrix.cfg.opt }}; From 93301b7e7025d3bb099dae512e420be88239cb92 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Thu, 13 Aug 2026 02:03:36 +1000 Subject: [PATCH 13/17] curl allow redirect https --- libs/openFrameworks/utils/ofURLFileLoader.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libs/openFrameworks/utils/ofURLFileLoader.cpp b/libs/openFrameworks/utils/ofURLFileLoader.cpp index 940947bc788..2c929d89554 100644 --- a/libs/openFrameworks/utils/ofURLFileLoader.cpp +++ b/libs/openFrameworks/utils/ofURLFileLoader.cpp @@ -341,9 +341,16 @@ ofHttpResponse ofURLFileLoaderImpl::handleRequest(const ofHttpRequest & request) curl_easy_setopt(curl.get(), CURLOPT_SSL_VERIFYPEER, 0L); curl_easy_setopt(curl.get(), CURLOPT_SSL_VERIFYHOST, 0L); } - curl_easy_setopt(curl.get(), CURLOPT_URL, request.url.c_str()); + ofLogVerbose("ofURLFileLoader") << "Request URL: '" << request.url << "'"; + CURLcode urlRes = curl_easy_setopt(curl.get(), CURLOPT_URL, request.url.c_str()); + if(urlRes != CURLE_OK) { + ofLogError("ofURLFileLoader") << "CURLOPT_URL failed for '" << request.url << "': " << curl_easy_strerror(urlRes); + return ofHttpResponse(request, -1, curl_easy_strerror(urlRes)); + } curl_easy_setopt(curl.get(), CURLOPT_FOLLOWLOCATION, 1L); curl_easy_setopt(curl.get(), CURLOPT_MAXREDIRS, 20L); + curl_easy_setopt(curl.get(), CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS); + curl_easy_setopt(curl.get(), CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS); if (request.contentType != "") { headers = curl_slist_append(headers, ("Content-Type: " + request.contentType).c_str()); From f3e8de2d479826198c26c94865681727315d860f Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Thu, 13 Aug 2026 19:28:34 +1000 Subject: [PATCH 14/17] OpenSSL random --- libs/openFrameworks/utils/ofURLFileLoader.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libs/openFrameworks/utils/ofURLFileLoader.cpp b/libs/openFrameworks/utils/ofURLFileLoader.cpp index 2c929d89554..ff045ee634b 100644 --- a/libs/openFrameworks/utils/ofURLFileLoader.cpp +++ b/libs/openFrameworks/utils/ofURLFileLoader.cpp @@ -21,6 +21,7 @@ using std::string; #include #include #include + #include #include #include @@ -72,6 +73,12 @@ class ofURLFileLoaderImpl : public ofThread, public ofBaseURLFileLoader { ofURLFileLoaderImpl::ofURLFileLoaderImpl() { if (!curlInited) { curl_global_init(CURL_GLOBAL_ALL); +#if !defined(NO_OPENSSL) + // OpenSSL 4.0.1 on macOS arm64 needs explicit RAND_poll for * Insufficient randomness + if(RAND_status() == 0) { + RAND_poll(); + } +#endif } } @@ -338,8 +345,8 @@ ofHttpResponse ofURLFileLoaderImpl::handleRequest(const ofHttpRequest & request) curl_easy_setopt(curl.get(), CURLOPT_USERAGENT, "curl/unknown"); } if(version->features & CURL_VERSION_SSL) { - curl_easy_setopt(curl.get(), CURLOPT_SSL_VERIFYPEER, 0L); - curl_easy_setopt(curl.get(), CURLOPT_SSL_VERIFYHOST, 0L); + curl_easy_setopt(curl.get(), CURLOPT_SSL_VERIFYPEER, 1L); + curl_easy_setopt(curl.get(), CURLOPT_SSL_VERIFYHOST, 2L); } ofLogVerbose("ofURLFileLoader") << "Request URL: '" << request.url << "'"; CURLcode urlRes = curl_easy_setopt(curl.get(), CURLOPT_URL, request.url.c_str()); From ea5b146b4822d25e99baa9cbca495cb67691d1ed Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Fri, 14 Aug 2026 01:30:05 +1000 Subject: [PATCH 15/17] OpenSSL 4.0.1 random --- libs/openFrameworks/utils/ofURLFileLoader.cpp | 110 +++++++++++++++++- 1 file changed, 108 insertions(+), 2 deletions(-) diff --git a/libs/openFrameworks/utils/ofURLFileLoader.cpp b/libs/openFrameworks/utils/ofURLFileLoader.cpp index ff045ee634b..988dad0e699 100644 --- a/libs/openFrameworks/utils/ofURLFileLoader.cpp +++ b/libs/openFrameworks/utils/ofURLFileLoader.cpp @@ -3,6 +3,15 @@ #include "ofUtils.h" #include "ofFileUtils.h" #include "ofLog.h" +#include +#include +#if !defined(TARGET_OS_WIN32) +#include +#endif +#if defined(TARGET_OSX) +#include +#include +#endif using std::map; using std::set; @@ -22,11 +31,40 @@ using std::string; #include #include #include + #include + #include #include #include #define CERTIFICATE_FILE "cacert.pem" #define PRIVATE_KEY_FILE "cacert.key" + + // OpenSSL 4.x static DRBG fallback - only for 4.0+ where provider DRBG fetch fails + #if OPENSSL_VERSION_MAJOR >= 4 + static int custom_rand_seed(const void *buf, int num) { RAND_add(buf, num, (double)num); return 1; } + static int custom_rand_bytes(unsigned char *buf, int num) { + #if defined(TARGET_OSX) + if(getentropy(buf, (size_t)num)==0) return 1; + arc4random_buf(buf, (size_t)num); + return 1; + #else + for(int i=0;i= 4 + // OpenSSL 4.0 DRBG is in default provider - must load config/provider before RAND + OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG | OPENSSL_INIT_LOAD_CRYPTO_STRINGS | OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS, NULL); + OSSL_PROVIDER *def = OSSL_PROVIDER_load(NULL, "default"); + if(def) ofLogVerbose("ofURLFileLoader") << "default provider loaded"; + else ofLogError("ofURLFileLoader") << "default provider load failed " << ERR_get_error(); +#endif if(RAND_status() == 0) { - RAND_poll(); + int pr = RAND_poll(); + ofLogVerbose("ofURLFileLoader") << "initial RAND_poll()=" << pr << " status=" << RAND_status() << " err=" << ERR_get_error(); } #endif } @@ -324,6 +369,61 @@ int progress_cb(void* ptr, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ulto } ofHttpResponse ofURLFileLoaderImpl::handleRequest(const ofHttpRequest & request) { +#if !defined(NO_OPENSSL) +#if OPENSSL_VERSION_MAJOR >= 4 + // OpenSSL 4.0 provider DRBG fetch fails on 4.0.1 apothecary static - arc4random fallback + if(RAND_status()==0) { + OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG | OPENSSL_INIT_LOAD_CRYPTO_STRINGS | OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS, NULL); + OSSL_PROVIDER *def = OSSL_PROVIDER_load(NULL, "default"); + if(def) ofLogVerbose("ofURLFileLoader") << "handleRequest default provider loaded " << def; + else ofLogError("ofURLFileLoader") << "default provider load failed err=" << ERR_get_error(); + if(RAND_status()==0) { + // fallback bypasses broken DRBG - only for 4.0+ + RAND_set_rand_method(&custom_rand_method); + ofLogVerbose("ofURLFileLoader") << "installed custom arc4random RAND_METHOD fallback, status=" << RAND_status(); + } + } +#endif + for(int i=0; i<3 && RAND_status()==0; ++i) { + int pr = RAND_poll(); + ofLogVerbose("ofURLFileLoader") << "RAND_poll try " << i << " ret=" << pr << " status=" << RAND_status() << " err=" << ERR_get_error(); + if(RAND_status()==0) { + unsigned char buf[256]; +#if defined(TARGET_OSX) + // getentropy is the preferred macOS entropy source (requires 256 bits) + if(getentropy(buf, sizeof(buf)) == 0) { + RAND_add(buf, sizeof(buf), sizeof(buf)); + ofLogVerbose("ofURLFileLoader") << "seeded via getentropy 256B status=" << RAND_status(); + } else { + arc4random_buf(buf, sizeof(buf)); + RAND_add(buf, sizeof(buf), sizeof(buf)); + ofLogVerbose("ofURLFileLoader") << "seeded via arc4random_buf 256B status=" << RAND_status(); + } + // OPENSSL temp wipe + OPENSSL_cleanse(buf, sizeof(buf)); +#endif + int loaded = RAND_load_file("/dev/urandom", 256); + ofLogVerbose("ofURLFileLoader") << "RAND_load_file /dev/urandom 256 -> " << loaded << " status=" << RAND_status(); + // also load EGD style fallback via time/pid/clock with full entropy estimate + unsigned int seed = (unsigned int)time(nullptr) ^ (unsigned int)clock(); +#if !defined(TARGET_OS_WIN32) + seed ^= (unsigned int)getpid(); +#endif + RAND_add(&seed, sizeof(seed), sizeof(seed)); + OPENSSL_cleanse(&seed, sizeof(seed)); + pr = RAND_poll(); + ofLogVerbose("ofURLFileLoader") << "second RAND_poll ret=" << pr << " status=" << RAND_status(); + } + } + if(RAND_status()==0) { + unsigned long e = ERR_get_error(); + char ebuf[256]={0}; + ERR_error_string_n(e, ebuf, sizeof(ebuf)); + ofLogError("ofURLFileLoader") << "RAND_status still 0 after poll/seed err=" << e << " " << ebuf << " - https will fail Insufficient randomness"; + } else { + ofLogVerbose("ofURLFileLoader") << "RAND_status OK=" << RAND_status(); + } +#endif std::unique_ptr curl = std::unique_ptr(curl_easy_init(), curl_easy_cleanup); if (!curl) { ofLogError("ofURLFileLoader") << "curl_easy_init() failed!"; @@ -356,8 +456,14 @@ ofHttpResponse ofURLFileLoaderImpl::handleRequest(const ofHttpRequest & request) } curl_easy_setopt(curl.get(), CURLOPT_FOLLOWLOCATION, 1L); curl_easy_setopt(curl.get(), CURLOPT_MAXREDIRS, 20L); + // curl 7.85.0+ uses _STR variants (deprecated bitmask); guard for 8.21+ / 7.85+ +#if LIBCURL_VERSION_NUM >= 0x075500 + curl_easy_setopt(curl.get(), CURLOPT_REDIR_PROTOCOLS_STR, "http,https"); + curl_easy_setopt(curl.get(), CURLOPT_PROTOCOLS_STR, "http,https"); +#else curl_easy_setopt(curl.get(), CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS); curl_easy_setopt(curl.get(), CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS); +#endif if (request.contentType != "") { headers = curl_slist_append(headers, ("Content-Type: " + request.contentType).c_str()); From c0cad0b5afbb0fab897e9c2d102c6aef1b1fb287 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Fri, 14 Aug 2026 01:43:08 +1000 Subject: [PATCH 16/17] Windows --- libs/openFrameworks/utils/ofURLFileLoader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/openFrameworks/utils/ofURLFileLoader.cpp b/libs/openFrameworks/utils/ofURLFileLoader.cpp index 988dad0e699..0da826ffff7 100644 --- a/libs/openFrameworks/utils/ofURLFileLoader.cpp +++ b/libs/openFrameworks/utils/ofURLFileLoader.cpp @@ -5,7 +5,7 @@ #include "ofLog.h" #include #include -#if !defined(TARGET_OS_WIN32) +#if !defined(_WIN32) && !defined(TARGET_OS_WIN32) #include #endif #if defined(TARGET_OSX) @@ -406,7 +406,7 @@ ofHttpResponse ofURLFileLoaderImpl::handleRequest(const ofHttpRequest & request) ofLogVerbose("ofURLFileLoader") << "RAND_load_file /dev/urandom 256 -> " << loaded << " status=" << RAND_status(); // also load EGD style fallback via time/pid/clock with full entropy estimate unsigned int seed = (unsigned int)time(nullptr) ^ (unsigned int)clock(); -#if !defined(TARGET_OS_WIN32) +#if !defined(_WIN32) && !defined(TARGET_OS_WIN32) seed ^= (unsigned int)getpid(); #endif RAND_add(&seed, sizeof(seed), sizeof(seed)); From a7c9adad87bd33bd542464bbae167ad23fd8b2fc Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Fri, 14 Aug 2026 01:49:47 +1000 Subject: [PATCH 17/17] ofxURLFileLoader cleaned up - debugs removed --- libs/openFrameworks/utils/ofURLFileLoader.cpp | 38 +++++++------------ 1 file changed, 13 insertions(+), 25 deletions(-) diff --git a/libs/openFrameworks/utils/ofURLFileLoader.cpp b/libs/openFrameworks/utils/ofURLFileLoader.cpp index 0da826ffff7..b35893abe83 100644 --- a/libs/openFrameworks/utils/ofURLFileLoader.cpp +++ b/libs/openFrameworks/utils/ofURLFileLoader.cpp @@ -115,13 +115,10 @@ ofURLFileLoaderImpl::ofURLFileLoaderImpl() { #if OPENSSL_VERSION_MAJOR >= 4 // OpenSSL 4.0 DRBG is in default provider - must load config/provider before RAND OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG | OPENSSL_INIT_LOAD_CRYPTO_STRINGS | OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS, NULL); - OSSL_PROVIDER *def = OSSL_PROVIDER_load(NULL, "default"); - if(def) ofLogVerbose("ofURLFileLoader") << "default provider loaded"; - else ofLogError("ofURLFileLoader") << "default provider load failed " << ERR_get_error(); + OSSL_PROVIDER_load(NULL, "default"); #endif if(RAND_status() == 0) { - int pr = RAND_poll(); - ofLogVerbose("ofURLFileLoader") << "initial RAND_poll()=" << pr << " status=" << RAND_status() << " err=" << ERR_get_error(); + RAND_poll(); } #endif } @@ -371,58 +368,49 @@ int progress_cb(void* ptr, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ulto ofHttpResponse ofURLFileLoaderImpl::handleRequest(const ofHttpRequest & request) { #if !defined(NO_OPENSSL) #if OPENSSL_VERSION_MAJOR >= 4 - // OpenSSL 4.0 provider DRBG fetch fails on 4.0.1 apothecary static - arc4random fallback + // OpenSSL 4.0 static provider DRBG - fallback to arc4random when fetch fails if(RAND_status()==0) { OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG | OPENSSL_INIT_LOAD_CRYPTO_STRINGS | OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS, NULL); - OSSL_PROVIDER *def = OSSL_PROVIDER_load(NULL, "default"); - if(def) ofLogVerbose("ofURLFileLoader") << "handleRequest default provider loaded " << def; - else ofLogError("ofURLFileLoader") << "default provider load failed err=" << ERR_get_error(); + OSSL_PROVIDER_load(NULL, "default"); if(RAND_status()==0) { - // fallback bypasses broken DRBG - only for 4.0+ RAND_set_rand_method(&custom_rand_method); - ofLogVerbose("ofURLFileLoader") << "installed custom arc4random RAND_METHOD fallback, status=" << RAND_status(); +#ifdef DEBUG_CURL + ofLogVerbose("ofURLFileLoader") << "installed custom arc4random RAND_METHOD fallback"; +#endif } } #endif for(int i=0; i<3 && RAND_status()==0; ++i) { - int pr = RAND_poll(); - ofLogVerbose("ofURLFileLoader") << "RAND_poll try " << i << " ret=" << pr << " status=" << RAND_status() << " err=" << ERR_get_error(); + RAND_poll(); if(RAND_status()==0) { unsigned char buf[256]; #if defined(TARGET_OSX) - // getentropy is the preferred macOS entropy source (requires 256 bits) if(getentropy(buf, sizeof(buf)) == 0) { RAND_add(buf, sizeof(buf), sizeof(buf)); - ofLogVerbose("ofURLFileLoader") << "seeded via getentropy 256B status=" << RAND_status(); } else { arc4random_buf(buf, sizeof(buf)); RAND_add(buf, sizeof(buf), sizeof(buf)); - ofLogVerbose("ofURLFileLoader") << "seeded via arc4random_buf 256B status=" << RAND_status(); } - // OPENSSL temp wipe OPENSSL_cleanse(buf, sizeof(buf)); #endif - int loaded = RAND_load_file("/dev/urandom", 256); - ofLogVerbose("ofURLFileLoader") << "RAND_load_file /dev/urandom 256 -> " << loaded << " status=" << RAND_status(); - // also load EGD style fallback via time/pid/clock with full entropy estimate + RAND_load_file("/dev/urandom", 256); unsigned int seed = (unsigned int)time(nullptr) ^ (unsigned int)clock(); #if !defined(_WIN32) && !defined(TARGET_OS_WIN32) seed ^= (unsigned int)getpid(); #endif RAND_add(&seed, sizeof(seed), sizeof(seed)); OPENSSL_cleanse(&seed, sizeof(seed)); - pr = RAND_poll(); - ofLogVerbose("ofURLFileLoader") << "second RAND_poll ret=" << pr << " status=" << RAND_status(); + RAND_poll(); } } +#ifdef DEBUG_CURL if(RAND_status()==0) { unsigned long e = ERR_get_error(); char ebuf[256]={0}; ERR_error_string_n(e, ebuf, sizeof(ebuf)); - ofLogError("ofURLFileLoader") << "RAND_status still 0 after poll/seed err=" << e << " " << ebuf << " - https will fail Insufficient randomness"; - } else { - ofLogVerbose("ofURLFileLoader") << "RAND_status OK=" << RAND_status(); + ofLogError("ofURLFileLoader") << "RAND_status still 0 err=" << e << " " << ebuf; } +#endif #endif std::unique_ptr curl = std::unique_ptr(curl_easy_init(), curl_easy_cleanup); if (!curl) {