From: Dr. Stephen Henson Date: Fri, 22 Jul 2016 14:33:15 +0000 (+0100) Subject: print out MAC algorithm X-Git-Tag: OpenSSL_1_1_0-pre6~56 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=44c248b5acc7fe3e48fa7b08bbc71fbb10650cdb;p=oweals%2Fopenssl.git print out MAC algorithm Reviewed-by: Rich Salz --- 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) {