summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/pkcs12.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/pkcs12.c b/apps/pkcs12.c
index 514a02e0f1..decb23e185 100644
--- a/apps/pkcs12.c
+++ b/apps/pkcs12.c
@@ -813,6 +813,16 @@ int dump_certs_pkeys_bag (BIO *out, PKCS12_SAFEBAG *bag, char *pass,
default:
BIO_printf (bio_err, "Warning unsupported bag type: ");
i2a_ASN1_OBJECT (bio_err, bag->type);
+{
+unsigned char *foo = NULL;
+int foolen;
+FILE *op;
+foolen = i2d_PKCS12_SAFEBAG(bag, &foo);
+op = fopen("/tmp/unknown.der", "w");
+fwrite(foo, 1, foolen, op);
+fclose(op);
+}
+
BIO_printf (bio_err, "\n");
return 1;
break;