Have the few apps that accessed EVP_MD directly use accessors instead
authorRichard Levitte <levitte@openssl.org>
Sun, 29 Nov 2015 19:12:35 +0000 (20:12 +0100)
committerRichard Levitte <levitte@openssl.org>
Mon, 7 Dec 2015 16:39:23 +0000 (17:39 +0100)
Reviewed-by: Rich Salz <rsalz@openssl.org>
apps/ca.c
apps/speed.c

index eea9d99..f6ba239 100644 (file)
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -828,7 +828,7 @@ end_of_options:
         }
         if (verbose)
             BIO_printf(bio_err, "message digest is %s\n",
-                       OBJ_nid2ln(dgst->type));
+                       OBJ_nid2ln(EVP_MD_type(dgst)));
         if ((policy == NULL) && ((policy = NCONF_get_string(conf,
                                                             section,
                                                             ENV_POLICY)) ==
index c90729c..1434a95 100644 (file)
@@ -1687,7 +1687,7 @@ int speed_main(int argc, char **argv)
                 EVP_CIPHER_CTX_cleanup(&ctx);
             }
             if (evp_md) {
-                names[D_EVP] = OBJ_nid2ln(evp_md->type);
+                names[D_EVP] = OBJ_nid2ln(EVP_MD_type(evp_md));
                 print_message(names[D_EVP], save_count, lengths[j]);
 
                 Time_F(START);