Skip to content

Commit

Permalink
Merge pull request #8226 from ColtonWilley/x509_store_fix_get_objects
Browse files Browse the repository at this point in the history
Fix wolfSSL_X509_STORE_get0_objects to handle no CA
  • Loading branch information
julek-wolfssl authored Nov 27, 2024
2 parents 5e13fc2 + 5460ba8 commit e9a4f7d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/x509_str.c
Original file line number Diff line number Diff line change
Expand Up @@ -1850,6 +1850,13 @@ WOLF_STACK_OF(WOLFSSL_X509_OBJECT)* wolfSSL_X509_STORE_get0_objects(
#if defined(WOLFSSL_SIGNER_DER_CERT) && !defined(NO_FILESYSTEM)
cert_stack = wolfSSL_CertManagerGetCerts(store->cm);
store->numAdded = 0;
if (cert_stack == NULL && wolfSSL_sk_X509_num(store->certs) > 0) {
cert_stack = wolfSSL_sk_X509_new_null();
if (cert_stack == NULL) {
WOLFSSL_MSG("wolfSSL_sk_X509_OBJECT_new error");
goto err_cleanup;
}
}
for (i = 0; i < wolfSSL_sk_X509_num(store->certs); i++) {
if (wolfSSL_sk_X509_push(cert_stack,
wolfSSL_sk_X509_value(store->certs, i)) > 0) {
Expand Down

0 comments on commit e9a4f7d

Please sign in to comment.