Bug 290315 - mail/py-pyspf broken with openssl32+ patch provided, tested to OpenSSL 3.0.16
Summary: mail/py-pyspf broken with openssl32+ patch provided, tested to OpenSSL 3.0.16
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-17 02:39 UTC by gessel
Modified: 2025-10-17 02:40 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (sunpoet)


Attachments
Patch for pyspf-milter for to set CRYPTOGRAPHY_OPENSSL_NO_LEGACY (442 bytes, patch)
2025-10-17 02:39 UTC, gessel
no flags Details | Diff
Patch for spf.py-3.11 to set CRYPTOGRAPHY_OPENSSL_NO_LEGACY (492 bytes, patch)
2025-10-17 02:40 UTC, gessel
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description gessel 2025-10-17 02:39:05 UTC
Created attachment 264643 [details]
Patch for pyspf-milter for to set CRYPTOGRAPHY_OPENSSL_NO_LEGACY

On my system, where I use OpenSSL 3.0.16 from ports, default mail/py-pyspf service silently fails to start.  The logs fill with errors like:

postfix/smtp-in/smtpd[76621]: warning: connect to Milter service unix:/var/run/pyspf-milter/pyspf-milter.sock: No such file or directory

Executing

/usr/sbin/daemon -c /usr/local/bin/pyspf-milter /usr/local/etc/pyspf-milter/pyspf-milter.conf

yields some additional data

RuntimeError: OpenSSL 3.0's legacy provider failed to load. This is a fatal error by default, but cryptography supports running without legacy algorithms by setting the environment variable CRYPTOGRAPHY_OPENSSL_NO_LEGACY. If you did not expect this error, you have likely made a mistake with your OpenSSL configuration.

The attached patches restore normal operation.
Comment 1 gessel 2025-10-17 02:40:15 UTC
Created attachment 264644 [details]
Patch for spf.py-3.11 to set CRYPTOGRAPHY_OPENSSL_NO_LEGACY