wolfSSL as Server
What I meant is that the OpenSSL s_client processes the certificates, but doesn't fail the connect if the certificate isn't good. It is printing the result
Verify return code: 21 (unable to verify the first certificate)
but not erroring out. Our example code fails the connect() or accept().
It looks like the certificates in cert_test.h are not the same as the certificates in the certs directory. I get different behavior between using the code version of the server certificate and the one in the directory. I see errors in OpenSSL like you do when I use the array version. The file version verifies as OK. (Note, the array version of the CA certificate will verify the array version of the server certificate.)
I have logged an issue into our GitHub issue tracker for updating the certs_test.h file.
wolfSSL as Client
Do you have a Wireshark capture of this transaction? Also, which options are you configuring with? This might be related to the issue above, as well, with the incorrect certificates.