I have a paid ssl cert from comodo. Seems to work ok with the following lines.
SSL_CTX_use_certificate_file(ctx,"crt2/my_domain_com.crt",SSL_FILETYPE_PEM);
SSL_CTX_use_PrivateKey_file(ctx,"crt2/private.key",SSL_FILETYPE_PEM);
SSL_CTX_load_verify_locations(ctx, "crt2/PositiveSSLCA2.crt",NULL);
However when I test it on http://sslchecker.com/sslchecker I get "VENDOR SIGNED: NO SSL is not trusted"
I assume it has something to do with the AddTrustExternalCARoot.crt file that comodo included but I'm not using. Haven't been able to find instructions anywhere on how to use this file and make the "VENDOR SIGNED: yes"