diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2010-05-15 00:34:06 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2010-05-15 00:34:06 +0000 |
commit | 19674b5a1d10bbd4bf0537d891e8908c1d572832 (patch) | |
tree | 29c195cd8a62227ba63a4dc315e708ceeeba8cd8 /apps | |
parent | e855d538de55e879019dfbf1467b578e50b75730 (diff) | |
download | openssl-19674b5a1d10bbd4bf0537d891e8908c1d572832.tar.gz |
PR: 2253
Submitted By: Ger Hobbelt <ger@hobbelt.com>
Check callback return value when outputting errors.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/pkcs12.c | 10 |
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; |