SSL_CTX_add_extra_chain_cert
res = SSL_CTX_add_extra_chain_cert(ssl_ctx, cert);
if (!SSL_CTX_add_extra_chain_cert(sctx, chaincert)) {