summaryrefslogtreecommitdiffstats
path: root/apps/pkcs12.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2016-07-22 15:33:15 +0100
committerDr. Stephen Henson <steve@openssl.org>2016-07-29 23:25:47 +0100
commit44c248b5acc7fe3e48fa7b08bbc71fbb10650cdb (patch)
treec28b92c891078213a0f1830d82815ebcd94de897 /apps/pkcs12.c
parente032117db251968bd09badc7d4718c2497302e55 (diff)
print out MAC algorithm
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'apps/pkcs12.c')
-rw-r--r--apps/pkcs12.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/pkcs12.c b/apps/pkcs12.c
index 25479058bd..315b72d3a8 100644
--- a/apps/pkcs12.c
+++ b/apps/pkcs12.c
@@ -522,9 +522,13 @@ int pkcs12_main(int argc, char **argv)
if ((options & INFO) && PKCS12_mac_present(p12)) {
ASN1_INTEGER *tmaciter;
-
- PKCS12_get0_mac(NULL, NULL, NULL, &tmaciter, p12);
- BIO_printf(bio_err, "MAC Iteration %ld\n",
+ X509_ALGOR *macalgid;
+ ASN1_OBJECT *macobj;
+ PKCS12_get0_mac(NULL, &macalgid, NULL, &tmaciter, p12);
+ X509_ALGOR_get0(&macobj, NULL, NULL, macalgid);
+ BIO_puts(bio_err, "MAC:");
+ i2a_ASN1_OBJECT(bio_err, macobj);
+ BIO_printf(bio_err, " Iteration %ld\n",
tmaciter != NULL ? ASN1_INTEGER_get(tmaciter) : 1L);
}
if (macver) {