Hi mkey,
Can you try testing your code with the most recent CyaSSL code on GitHub (https://github.com/cyassl/cyassl)? We've changed a few things regarding CA Basic Constraints recently which looks like it might make a difference. Also, note that you can build CyaSSL with --enable-debug and then call CyaSSL_Debugging_ON() from your application for more verbose debug information from CyaSSL.
As you know, set SSL_VERIFY_PEER, using:
CyaSSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, 0);
It looks like you have found the correct certificate chain, yes. I downloaded the Equifax Secure Certificate Authority from here: https://www.geotrust.com/resources/root-certificates/.
With CyaSSL (version >= 2.0), only the top or root certificate of the chain is required to be loaded as a trusted certificate in order to properly verify the chain. So, in your case, you could load the equifax CA cert like this (where equifaxCert is the path to your Equifax CA Cert):
CyaSSL_CTX_load_verify_locations(ctx, equifaxCert, 0)
This will return SSL_SUCCESS upon success. I tried this using our example client after making the above cert modifications (./examples/client/client pop.gmail.com 995) and it was able to connect to pop.gmail.com.
Note: the function CyaSSL_Init according to the manual returns a "1" if successful, while in fact it returns a 0 if everything went OK.
Thanks for the heads up on this. We'll make sure the docs and/or code get changed to clear this up.
Regards,
Chris