summaryrefslogtreecommitdiffstats
path: root/apps/pkcs12.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2006-05-17 18:24:35 +0000
committerDr. Stephen Henson <steve@openssl.org>2006-05-17 18:24:35 +0000
commita263253545a6b576af7cc62e17873c34aa55e1a0 (patch)
treeab2614b39925a283ff0e0f2ba75b433cf68414f7 /apps/pkcs12.c
parent76d6ac4b0631a63021d2efac580b672111ec85f0 (diff)
Don't try to print PBE information if it can't be decoded.
Diffstat (limited to 'apps/pkcs12.c')
-rw-r--r--apps/pkcs12.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/pkcs12.c b/apps/pkcs12.c
index 781aeb373b..037aa3f011 100644
--- a/apps/pkcs12.c
+++ b/apps/pkcs12.c
@@ -807,12 +807,14 @@ int alg_print (BIO *x, X509_ALGOR *alg)
PBEPARAM *pbe;
const unsigned char *p;
p = alg->parameter->value.sequence->data;
- pbe = d2i_PBEPARAM (NULL, &p, alg->parameter->value.sequence->length);
+ pbe = d2i_PBEPARAM(NULL, &p, alg->parameter->value.sequence->length);
+ if (!pbe)
+ return 1;
BIO_printf (bio_err, "%s, Iteration %ld\n",
OBJ_nid2ln(OBJ_obj2nid(alg->algorithm)),
ASN1_INTEGER_get(pbe->iter));
PBEPARAM_free (pbe);
- return 0;
+ return 1;
}
/* Load all certificates from a given file */