Seems upstream added OpenSSL 3.0 support in https://jira.mariadb.org/browse/MDEV-25785. It has 4 git commits linked, from which I learned that:
* OpenSSL 3.0 is disabled on all old MariaDB majors (https://github.com/MariaDB/server/commit/c9beef43154a199bfcd9f71049c011a2ed77ca74) and enabled only on 10.8 and 10.9+ (https://github.com/MariaDB/server/commit/64e358821e0e8b5a2134aa93ba9ddf24cd46ac7c). * Support for OpenSSL 3.0 was committed in https://github.com/MariaDB/server/commit/d42c2efbaa06a0307c2f0fd8fa87819ff50bbd7e on mariadb-10.8.1+. On Zulip (https://mariadb.zulipchat.com/#narrow/stream/118759-general/topic/OpenSSL.203.2E0) I got a reply that backporting OpenSSL support is planned for older major MariaDB versions, but not easy due to build errors and test failures that also need to be addressed.