← Back

ofxPocoHeaders

github.com/fred-dev/ofxPocoHeaders · @fred-dev
OF 0.12 Web/Networking Utilities

POCO C++ libraries built from source for openFrameworks — drop-in replacement for ofxPoco, links OF core OpenSSL/zlib

0 0 Last commit 18d ago Created 20d ago

README

ofxPocoHeaders



The POCO C++ Libraries for openFrameworks, compiled from source as part of your project.

ofxPocoHeaders is a drop-in replacement for ofxPoco:

Currently vendored: POCO 1.15.2.

Usage



Replace ofxPoco with ofxPocoHeaders in your project's addons.make (and in the ADDON_DEPENDENCIES of any addon that depended on ofxPoco), then regenerate the project with the projectGenerator.

ofxPocoHeaders


Do not use ofxPoco and ofxPocoHeaders in the same project. Both provide the Poco:: classes. If both are present, the build stops with an error that says so.

The first build of a project compiles POCO (about 500 files) and takes a few minutes. Later builds are incremental.

Platforms



PlatformStatus
macOS (make)builds and runs the example (HTTPS included)
macOS (Xcode), iOS, tvOSnot yet tested
Linux, Windows (VS, MSYS2), Androidnot yet tested
EmscriptenNet only; NetSSL_OpenSSL and Crypto are excluded because there is no OpenSSL in the browser
On Apple platforms POCO requires C++20 or newer, which openFrameworks already uses.

How it works



libs/poco/include/Poco/...   public headers of all vendored modules
libs/poco/source/...         POCO's own sources (not compiled directly)
libs/poco/src/...            generated one-line wrappers, the only files compiled


POCO's CMake build decides which files to compile per platform, and which sources are only ever #included by others (for example Mutex_POSIX.cpp). scripts/update_poco.py applies the same rules and generates one small wrapper file per compilation unit, so any build system can compile the result without CMake. Build settings that POCO's CMake would pass as compiler flags live in the generated Poco/ofxPocoConfig.h, which Poco/Config.h includes. No ADDON_DEFINES are needed, and your code always sees the same settings POCO was compiled with.

Testing the addons that depend on it



Two scripts check the addons that moved from ofxPoco to ofxPocoHeaders. Both find openFrameworks from their own location, or you can pass --of.

# Every addon cloned from fred-dev's fork, on its poco_headers_only branch, up to date
scripts/check_addon_branches.sh          # add --fix to clone / switch / fast-forward where safe

Generate an Xcode project for one example per addon with the projectGenerator, build it for

this Mac's architecture, and optionally run each app for 20 seconds

scripts/test_addons_xcode.sh --run 20 # also: --make, --arch, --config, --only ofxHTTP, --pg


Test projects and logs go to apps/pocoHeadersTests_<timestamp>/, and the addon repos are never modified.

Updating POCO



python3 scripts/update_poco.py --version 1.15.2


The script clones the given POCO release and regenerates everything under libs/poco. Pass --source /path/to/poco to use an existing checkout instead.

OpenSSL 4.0 workarounds



The OpenSSL 4.0.2 package that openFrameworks currently ships for Apple platforms has two build-configuration problems that break TLS. The addon works around both. Each workaround only compiles when OpenSSL's own headers show the broken configuration, so both disappear once openFrameworks ships a fixed OpenSSL.

ProblemSymptomWorkaroundDisable with
Built without OPENSSL_NO_FIPS_JITTER: OpenSSL asks for a JITTER seed source that does not existRAND_bytes() fails, SSL_CTX_new() returns NULL, no TLS at allsrc/ofxPocoOpenSSLSeedFix.cpp registers a small provider that seeds from the operating system's random number generator, only if no real JITTER source existsOFX_POCO_NO_OPENSSL_SEED_FIX
Built with OPENSSL_NO_AUTOALGINIT: OpenSSL's digest and cipher name tables stay emptyEvery certificate chain fails with "CA signature digest algorithm too weak"; EVP_get_cipherbyname() lookups failsrc/ofxPocoOpenSSLAlgorithmsFix.cpp registers the same digests and ciphers OpenSSL registers itself by defaultOFX_POCO_NO_OPENSSL_ALGORITHMS_FIX

License



Get this addon

HTTPS
SSH