]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Fix] cryptobox: properly bypass RHEL/CentOS 10+ crypto-policies for SHA-1 DKIM master
authorVsevolod Stakhov <vsevolod@rspamd.com>
Thu, 29 Jan 2026 17:57:23 +0000 (17:57 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Thu, 29 Jan 2026 17:57:23 +0000 (17:57 +0000)
commit09ec9f34016b2eb992acd88d73b0d9a3bc432014
treee516703efad395657aa52f8fe61b3c89bad05bfb
parent2dbc6d32b8658ac7bb97b77cee1f0968f5cef11d
[Fix] cryptobox: properly bypass RHEL/CentOS 10+ crypto-policies for SHA-1 DKIM

RHEL/CentOS 10+ disables SHA-1 signatures via the rh-allow-sha1-signatures
config option, which is not bypassed by simply creating a new OSSL_LIB_CTX.

This fix:
- Creates a temporary OpenSSL config file with rh-allow-sha1-signatures=yes
- Loads it into the dedicated SHA-1 library context via OSSL_LIB_CTX_load_config
- Improves error messages to include algorithm name and RHEL-specific hints
- Captures OpenSSL error details when EVP_PKEY_verify fails
- Adds troubleshooting guidance in error messages

On non-RHEL systems, the config option is simply ignored.
src/libcryptobox/cryptobox.c
src/libserver/dkim.c