mirror of
https://github.com/cesanta/mongoose.git
synced 2026-09-30 21:42:42 +07:00
@@ -14581,6 +14581,7 @@ static STACK_OF(X509_INFO) * load_ca_certs(struct mg_str ca) {
|
||||
static bool add_ca_certs(SSL_CTX *ctx, STACK_OF(X509_INFO) * certs) {
|
||||
int i;
|
||||
X509_STORE *cert_store = SSL_CTX_get_cert_store(ctx);
|
||||
if (cert_store == NULL) return false;
|
||||
for (i = 0; i < sk_X509_INFO_num(certs); i++) {
|
||||
X509_INFO *cert_info = sk_X509_INFO_value(certs, i);
|
||||
if (cert_info->x509 && !X509_STORE_add_cert(cert_store, cert_info->x509))
|
||||
|
||||
@@ -39,6 +39,7 @@ static STACK_OF(X509_INFO) * load_ca_certs(struct mg_str ca) {
|
||||
static bool add_ca_certs(SSL_CTX *ctx, STACK_OF(X509_INFO) * certs) {
|
||||
int i;
|
||||
X509_STORE *cert_store = SSL_CTX_get_cert_store(ctx);
|
||||
if (cert_store == NULL) return false;
|
||||
for (i = 0; i < sk_X509_INFO_num(certs); i++) {
|
||||
X509_INFO *cert_info = sk_X509_INFO_value(certs, i);
|
||||
if (cert_info->x509 && !X509_STORE_add_cert(cert_store, cert_info->x509))
|
||||
|
||||
Reference in New Issue
Block a user