Skip to content

Commit 27feda0

Browse files
committed
Call OpenSSL_add_all_algorithms() on older openssl versions.
1 parent bf96cd3 commit 27feda0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

checksum.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ static const EVP_MD *csum_evp_md(struct name_num_item *nni)
154154
emd = NULL;
155155
else
156156
#endif
157-
emd = EVP_get_digestbyname(nni->name);
157+
emd = EVP_get_digestbyname(nni->name);
158158
if (emd && !(nni->flags & NNI_EVP_OK)) { /* Make sure it works before we advertise it */
159159
if (!ctx_evp && !(ctx_evp = EVP_MD_CTX_create()))
160160
out_of_memory("csum_evp_md");
@@ -787,6 +787,10 @@ void init_checksum_choices()
787787
if (initialized_choices)
788788
return;
789789

790+
#if defined USE_OPENSSL && OPENSSL_VERSION_NUMBER < 0x10100000L
791+
OpenSSL_add_all_algorithms();
792+
#endif
793+
790794
#if defined SUPPORT_XXH3 || defined USE_OPENSSL
791795
for (nni = valid_checksums.list; nni->name; nni++)
792796
verify_digest(nni, True);

0 commit comments

Comments
 (0)