Skip to content

Test that String#crypt supports $6$ (SHA-512) salts on Linux - #986

Open
silug wants to merge 1 commit into
ruby:masterfrom
silug:crypt-sha512-test
Open

silug wants to merge 1 commit into
ruby:masterfrom
silug:crypt-sha512-test

Conversation

@silug

@silug silug commented Nov 25, 2026

Copy link
Copy Markdown

As requested in #985, this adds a CI step that checks String#crypt honors a $6$ (SHA-512) salt. A CRuby built without libcrypt falls back to its built-in DES-only crypt and returns a 13-character DES hash instead.

The step runs on Linux only. macOS's libc crypt is DES-only, so it would fail there for reasons unrelated to how setup-ruby's Rubies are built.

Expected result: ubuntu-26.04 3.2 fails, since ruby-3.2.11-ubuntu-26.04-x64 isn't linked to libcrypt. I haven't checked the arm64 asset. I don't know how the JRuby and TruffleRuby rows will behave; if any of them don't use the system crypt, I can skip them in the step's if:.

🤖 Generated with Claude Code

A CRuby built without libcrypt falls back to its own DES-only crypt,
which silently ignores $1$/$5$/$6$ salts. See ruby#985.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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

Successfully merging this pull request may close these issues.

1 participant