/* Add any more certificates asked for */
if (certfile) {
- if(!(certs = load_certs(bio_err, certfile, FORMAT_PEM, NULL, e,
- "certificates from certfile"))) {
+ STACK_OF(X509) *morecerts=NULL;
+ if(!(morecerts = load_certs(bio_err, certfile, FORMAT_PEM,
+ NULL, e,
+ "certificates from certfile"))) {
goto export_end;
}
+ while(sk_X509_num(morecerts) > 0) {
+ sk_X509_push(certs, sk_X509_shift(morecerts));
+ }
+ sk_X509_free(morecerts);
}
#ifdef CRYPTO_MDEBUG