char *hmac_key = NULL;
char *mac_name = NULL, *digestname = NULL;
char *passinarg = NULL, *passin = NULL;
- const EVP_MD *md = NULL;
+ EVP_MD *md = NULL;
const char *outfile = NULL, *keyfile = NULL, *prog = NULL;
const char *sigfile = NULL;
const char *md_name = NULL;
struct doall_dgst_digests dec;
buf = app_malloc(BUFSIZE, "I/O buffer");
- md = EVP_get_digestbyname(argv[0]);
+ md = (EVP_MD *)EVP_get_digestbyname(argv[0]);
prog = opt_init(argc, argv, dgst_options);
while ((o = opt_next()) != OPT_EOF) {
goto end;
}
if (md == NULL)
- md = EVP_sha256();
+ md = (EVP_MD *)EVP_sha256();
if (!EVP_DigestInit_ex(mctx, md, impl)) {
BIO_printf(bio_err, "Error setting digest\n");
ERR_print_errors(bio_err);
if (md == NULL) {
EVP_MD_CTX *tctx;
+
BIO_get_md_ctx(bmd, &tctx);
- md = EVP_MD_CTX_get0_md(tctx);
+ md = EVP_MD_CTX_get1_md(tctx);
}
if (md != NULL)
md_name = EVP_MD_name(md);
BIO_free(in);
OPENSSL_free(passin);
BIO_free_all(out);
+ EVP_MD_free(md);
EVP_PKEY_free(sigkey);
sk_OPENSSL_STRING_free(sigopts);
sk_OPENSSL_STRING_free(macopts);