diff --git a/apps/pkcs12.c b/apps/pkcs12.c index 514a02e0f128881746d500bf760f72ecfe7f4507..b54c6f84a4a095d4fcc93c90a3adb19abf9f1a5e 100644 --- a/apps/pkcs12.c +++ b/apps/pkcs12.c @@ -647,7 +647,7 @@ int MAIN(int argc, char **argv) if (!twopass) BUF_strlcpy(macpass, pass, sizeof macpass); - if (options & INFO) BIO_printf (bio_err, "MAC Iteration %ld\n", p12->mac->iter ? ASN1_INTEGER_get (p12->mac->iter) : 1); + if ((options & INFO) && p12->mac) BIO_printf (bio_err, "MAC Iteration %ld\n", p12->mac->iter ? ASN1_INTEGER_get (p12->mac->iter) : 1); if(macver) { #ifdef CRYPTO_MDEBUG CRYPTO_push_info("verify MAC");