Digests not initialized properly with digest/3.2.1 on ruby/3.4.7 and macOS 15...
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 51
- Forks
- 37
- Avg merge
- 8h 16m
- Merged PRs (30d)
- 4
Description
If I use the default digest from ruby/3.4.7, all the digests work. But I had digest in my Gemfile, bundler updated it and all of the hexdigest failed...
Digest::SHA512::metadata is not initialized properly
Digest::SHA384::metadata is not initialized properly
Digest::SHA256::metadata is not initialized properly
Digest::MD5::metadata is not initialized properly
Digest::SHA1::metadata is not initialized properly
I tried the following...
export OPENSSL_LIBS=-L/opt/openssl-3.6.0/lib -lssl -lcrypto
export OPENSSL_PREFIX=/opt/openssl-3.6.0
export OPENSSL_INCLUDE_DIR=/opt/openssl-3.6.0/include
export OPENSSLDIR=/opt/openssl-3.6.0
export OPENSSL_ROOT_DIR=/opt/openssl-3.6.0
export OPENSSL_CFLAGS=-I/opt/openssl-3.6.0/include
export OPENSSL_LIB_DIR=/opt/openssl-3.6.0/lib
export CFLAGS=-I/opt/include -mmacosx-version-min=15.7 -I/opt/openssl-3.6.0/include
export LDFLAGS=-L/opt/lib -Wl,-rpath,/opt/lib -mmacosx-version-min=15.7 -L/opt/openssl-3.6.0/lib
gem install digest --platform=ruby --verbose -- --without-common-digest
and...
gem install digest --platform=ruby --verbose -- --with-bundled-sha2 --with-bundled-sha1 --with-bundled-rmd160 --with-bundled-md5 --without-common-digest
But I still get Digest::SHA256::metadata is not initialized properly. If I gem uninstall digest, everything works with ruby 3.4.7's default digest.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure on Ruby 3.4.7 with digest 3.2.1 on macOS 15, then compare the bundled/default digest with the separately installed gem using the reported installation options. Trace why the digest metadata is not initialized for hexdigest calls; done means the listed algorithms work after bundler installs digest.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, ruby
- Domain
- cryptography
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100