Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EVP_get_digestbyname returns null #17

Open
axtux opened this issue Jan 29, 2021 · 1 comment
Open

EVP_get_digestbyname returns null #17

axtux opened this issue Jan 29, 2021 · 1 comment

Comments

@axtux
Copy link

axtux commented Jan 29, 2021

When I run the software on Ubuntu 18.04, I get this error message:

Cannot initialize the default message digest sha256, aborting

Following the Linux Die manual at https://linux.die.net/man/3/evp_get_digestbyname:

EVP_get_digestbyname(), EVP_get_digestbynid() and EVP_get_digestbyobj() return an EVP_MD structure when passed a digest name, a digest NID or an ASN1_OBJECT structure respectively. The digest table must be initialized using, for example, OpenSSL_add_all_digests() for these functions to work.

Following the instructions from the manual, I added OpenSSL_add_all_digests(); before line 203 in main.c and it works.

I'll open a PR when I have time.

@jarryxy
Copy link

jarryxy commented Sep 9, 2021

Your code needs to add OpenSSL_add_all_digests () in main.c; Otherwise, EVP_get_digestbyname () will return as a NULL pointer. Causes the program to fail to run normally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants