security/libpki: Fix build with openssl3
Fixes :
- detection of OpenSSL version (a bit hacky IMHO)
- changes breaking compilation
Doesn't cover the replacement of obsoleted functions (specially the move
from engines to providers) which is way above my paygrade.
This patch has been upstream as a PR
(https://github.com/openca/libpki/pull/74).
PR: 272280
Approved by: bruno@ruomad.net (submitter is maintainer)