Segmentation fault is more then likely coming from the OpenSSL library, cause I've seen this happen on my local machines with version 3.x. Ubuntu 22.04 ships with OpenSSL 3.x by default.
More then likely have to reinstall OpenSSL library with version 1.1.x instead of 3.x. Still need to implement proper messages within CMake itself to warn users using OpenSSL 3.x.
I would try Ubuntu 21.10 or 20.04 and see if this happens again.