Don't try to print PBE information if it can't be decoded.
This commit is contained in:
parent
76d6ac4b06
commit
a263253545
@ -808,11 +808,13 @@ int alg_print (BIO *x, X509_ALGOR *alg)
|
|||||||
const unsigned char *p;
|
const unsigned char *p;
|
||||||
p = alg->parameter->value.sequence->data;
|
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",
|
BIO_printf (bio_err, "%s, Iteration %ld\n",
|
||||||
OBJ_nid2ln(OBJ_obj2nid(alg->algorithm)),
|
OBJ_nid2ln(OBJ_obj2nid(alg->algorithm)),
|
||||||
ASN1_INTEGER_get(pbe->iter));
|
ASN1_INTEGER_get(pbe->iter));
|
||||||
PBEPARAM_free (pbe);
|
PBEPARAM_free (pbe);
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Load all certificates from a given file */
|
/* Load all certificates from a given file */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user