Tweak for opaque EVP_MD: use EVP_MD_type(dgst) instead of dgst->type.
authortb <tb@openbsd.org>
Sun, 21 Nov 2021 22:34:30 +0000 (22:34 +0000)
committertb <tb@openbsd.org>
Sun, 21 Nov 2021 22:34:30 +0000 (22:34 +0000)
usr.bin/openssl/ca.c

index 8922486..c711f8b 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ca.c,v 1.51 2021/10/23 12:00:18 tb Exp $ */
+/* $OpenBSD: ca.c,v 1.52 2021/11/21 22:34:30 tb Exp $ */
 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
@@ -1082,7 +1082,7 @@ ca_main(int argc, char **argv)
                }
                if (ca_config.verbose)
                        BIO_printf(bio_err, "message digest is %s\n",
-                           OBJ_nid2ln(dgst->type));
+                           OBJ_nid2ln(EVP_MD_type(dgst)));
                if ((ca_config.policy == NULL) &&
                    ((ca_config.policy = NCONF_get_string(conf,
                    ca_config.section, ENV_POLICY)) == NULL)) {