aboutsummaryrefslogtreecommitdiffstats
path: root/apps/pkcs12.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2001-12-12 16:49:02 +0000
committerRichard Levitte <levitte@openssl.org>2001-12-12 16:49:02 +0000
commit206eb6a11d35f91b0165ac8fb597f71972e84489 (patch)
tree3f0e5a742b9c23a3d1bbcb98d9fede15306f6bdb /apps/pkcs12.c
parentf11fd3f4e167531c80ca5e89119762e880e7121b (diff)
downloadopenssl-206eb6a11d35f91b0165ac8fb597f71972e84489.tar.gz
Change pkcs12 so the certificates coming from -in do not get tossed if
-certfile is given as well.
Diffstat (limited to 'apps/pkcs12.c')
-rw-r--r--apps/pkcs12.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/pkcs12.c b/apps/pkcs12.c
index cd9c02808a..0e2bd6dbcd 100644
--- a/apps/pkcs12.c
+++ b/apps/pkcs12.c
@@ -459,10 +459,16 @@ int MAIN(int argc, char **argv)
/* 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