Skip to content

fix: migrate SHA* digests to EVP_Q_digest on OpenSSL 3.x#119

Merged
timlegge merged 2 commits intocpan-authors:mainfrom
toddr-bot:koan.toddr.bot/fix-deprecated-sha-digests
Mar 19, 2026
Merged

fix: migrate SHA* digests to EVP_Q_digest on OpenSSL 3.x#119
timlegge merged 2 commits intocpan-authors:mainfrom
toddr-bot:koan.toddr.bot/fix-deprecated-sha-digests

Conversation

@toddr-bot
Copy link
Copy Markdown
Contributor

@toddr-bot toddr-bot commented Mar 18, 2026

What

Migrate SHA1/SHA224/SHA256/SHA384/SHA512 in get_message_digest() to use EVP_Q_digest() on OpenSSL 3.x.

Why

These low-level SHA functions are deprecated since OpenSSL 3.0. The MD5 and RIPEMD160 cases were already migrated to EVP_Q_digest() — the SHA family was overlooked.

How

Applied the same #if OPENSSL_VERSION_NUMBER >= 0x30000000L / EVP_Q_digest() pattern already used for MD5 and RIPEMD160 to all five SHA variants. Pre-3.x codepaths are unchanged.

Testing

  • Build clean on OpenSSL 3.5.1 (no warnings)
  • All 476 tests pass

🤖 Generated with Claude Code


Quality Report

Changes: 1 file changed, 20 insertions(+)

Code scan: clean

Tests: passed (OK)

Branch hygiene: clean

Generated by Kōan post-mission quality pipeline

@timlegge timlegge marked this pull request as ready for review March 18, 2026 23:39
@timlegge
Copy link
Copy Markdown
Member

@toddr @atoomic I might restructure this into two ifdef sections instead of the separate ones for each digest type. Either way it looks fine though

@atoomic
Copy link
Copy Markdown
Collaborator

atoomic commented Mar 19, 2026

@toddr-bot rebase with suggestions above

toddr-bot and others added 2 commits March 19, 2026 01:10
SHA1(), SHA224(), SHA256(), SHA384(), and SHA512() are deprecated in
OpenSSL 3.0+. The MD5 and RIPEMD160 cases in get_message_digest() were
already migrated to EVP_Q_digest — apply the same treatment to all SHA
variants for consistency and to eliminate deprecation warnings on
OpenSSL 3.x builds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@toddr-bot toddr-bot force-pushed the koan.toddr.bot/fix-deprecated-sha-digests branch from d09711e to f57cbb0 Compare March 19, 2026 01:10
@toddr-bot
Copy link
Copy Markdown
Contributor Author

Rebase: fix: migrate SHA* digests to EVP_Q_digest on OpenSSL 3.x

Branch koan.toddr.bot/fix-deprecated-sha-digests rebased onto main and force-pushed.

Diff: 1 file changed, 24 insertions(+), 6 deletions(-)

Review feedback was analyzed and applied.

Actions

  • Rebased koan.toddr.bot/fix-deprecated-sha-digests onto upstream/main
  • Applied review feedback
  • Force-pushed koan.toddr.bot/fix-deprecated-sha-digests to origin
  • CI passed

CI

CI passed.


Automated by Kōan

@timlegge timlegge merged commit fbc122f into cpan-authors:main Mar 19, 2026
27 checks passed
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.

3 participants