SHA digest differences in version 1.0 and 1.1.1 at at
Fri May 14 08:21:55 UTC 2021


I am working with some legacy code which was written to use openssl 
version 1.0.

I am trying to make it work with openssl version 1.1.1 but the following 
line returns NULL.

     const EVP_MD* messageDigest = EVP_get_digestbyname("sha");

I changed it to the following.

     const EVP_MD* messageDigest = EVP_get_digestbyname("sha1");

That does return a EVP_MD pointer but when I use it with a EVP_MD_CTX to 
create a hash it produces a different hash than the legacy code for the 
same data.

What digest was returned by "sha" in the older version?


More information about the openssl-users mailing list