[openssl-commits] [openssl] master update

Dr. Stephen Henson steve at openssl.org
Fri Jul 29 22:28:43 UTC 2016


The branch master has been updated
       via  44c248b5acc7fe3e48fa7b08bbc71fbb10650cdb (commit)
      from  e032117db251968bd09badc7d4718c2497302e55 (commit)


- Log -----------------------------------------------------------------
commit 44c248b5acc7fe3e48fa7b08bbc71fbb10650cdb
Author: Dr. Stephen Henson <steve at openssl.org>
Date:   Fri Jul 22 15:33:15 2016 +0100

    print out MAC algorithm
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 apps/pkcs12.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/apps/pkcs12.c b/apps/pkcs12.c
index 2547905..315b72d 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) {


More information about the openssl-commits mailing list