From 9af8cb46cf594cf8066ded492f384e7a10aaaafe Mon Sep 17 00:00:00 2001 From: Steven Pritchard Date: Wed, 25 Nov 2026 03:03:10 +0000 Subject: [PATCH] Test that String#crypt supports $6$ (SHA-512) salts on Linux A CRuby built without libcrypt falls back to its own DES-only crypt, which silently ignores $1$/$5$/$6$ salts. See #985. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2d53bff55..6e5897305 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,6 +74,10 @@ jobs: - name: Subprocess test run: ruby test_subprocess.rb + # https://github.com/ruby/setup-ruby/issues/985 + - name: String#crypt supports $6$ (SHA-512) salts + if: runner.os == 'Linux' + run: ruby -e 'h = %q(password).crypt(%q($6$saltsalt$)); puts h; abort %q(String#crypt ignored the $6$ salt (libcrypt not linked?)) unless h.start_with?(%q($6$saltsalt$))' - name: OpenSSL compiled version run: ruby -ropenssl -e 'puts OpenSSL::OPENSSL_VERSION' - name: OpenSSL loaded version