I've attached a zip file containing files that I've used to try to reproduce this problem.
If you unzip and run gen.sh (answering "y" to everything) a root CA, intermediate CA and signing CA will be generated, along with a server certificate signed by the signing CA.
There are three config files, two of which work and one, cafile-fail.conf, fails. It still fails if I use SSL_CTX_use_certificate_chain_file() because the intermediate and root certificates are not loaded at all.
I've attached a zip file containing files that I've used to try to reproduce this problem.
If you unzip and run gen.sh (answering "y" to everything) a root CA, intermediate CA and signing CA will be generated, along with a server certificate signed by the signing CA.
There are three config files, two of which work and one, cafile-fail.conf, fails. It still fails if I use SSL_CTX_ use_certificate _chain_ file() because the intermediate and root certificates are not loaded at all.
Does this match what you are seeing?