mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-24 21:06:02 +03:00
[PR #2804] Modernize OpenSSL digest and HMAC error handling #2803
Labels
No labels
bug
bug
dataloss
duplicate
enhancement
feature request
help wanted
invalid
need info
performance
pull-request
question
question
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/s3fs-fuse#2803
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/2804
Author: @CarstenGrohmann
Created: 2/14/2026
Status: 🔄 Open
Base:
master← Head:digest_error_handling📝 Commits (6)
8de9c4aRemove support for OpenSSL < 1.1.11f4f0abUse shared EVP digest helper for md5 and sha25619448f2Add shared EVP helper for file descriptor digests253c26eReplace s3fs_md5_fd() with s3fs_digest_fd() wrapper1e86735Remove USE_OPENSSL_30 build flag5ce05c7Add error handling to HMAC call📊 Changes
4 files changed (+60 additions, -249 deletions)
View changed files
📝
COMPILATION.md(+2 -2)📝
configure.ac(+14 -11)📝
src/Makefile.am(+0 -3)📝
src/openssl_auth.cpp(+44 -233)📄 Description
Fixes #2796
Summary
USE_OPENSSL_30build flag (no longer needed)Changes
Build system
configure.ac: raiselibcryptominimum to 1.1.1 with compile-time version check; remove OpenSSL 3.0 detection andUSE_SSL_OPENSSL_30conditional; useDEPS_CFLAGSinAC_COMPILE_IFELSEso non-default installations are detected correctlysrc/Makefile.am: remove-DUSE_OPENSSL_30flagCOMPILATION.md: document OpenSSL >= 1.1.1 as minimum versionopenssl_auth.cpp (-251/+62 lines)
CRYPTO_set_locking_callbacketc.) — OpenSSL 1.1.0+ manages threading internallyERR_load_crypto_strings,EVP_cleanupetc.) — no-ops since OpenSSL 1.1.0s3fs_digest()ands3fs_digest_fd()as shared helpers for all digest operations (MD5, SHA256) with:std::unique_ptr<EVP_MD_CTX, decltype(&EVP_MD_CTX_free)>ERR_reason_error_string(ERR_get_error())EVP_MD_CTX_create()/EVP_MD_CTX_destroy()(deprecated since 1.1.0) withEVP_MD_CTX_new()/ EVP_MD_CTX_free()`EVP_get_digestbyname()string lookup with directEVP_md5()/EVP_sha256()accessorsMD5_Init/MD5_Update/MD5_Final(deprecated since 3.0) in favor of the shared EVP helper#ifdef USE_OPENSSL_30/#elsecode paths fors3fs_md5(),s3fs_md5_fd(),s3fs_sha256(),s3fs_sha256_fd()into single implementationsHMAC()call#pragma clang diagnostic ignored "-Wdeprecated-declarations"(no deprecated calls remain)Addresses all points from #2796
EVP_MD_CTX_new()checked in both helpersEVP_Digest*()calls checkedstd::unique_ptrwith custom deleter forEVP_MD_CTXfalse/nullptr🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.