fix(mailer): drop the TLS 1.2 pin

The pin worked around a TLS 1.3 problem with Hackney on OTP 23
(swoosh/swoosh#478). Pleroma no longer supports OTP 23.
This commit is contained in:
Lain Soykaf 2026-10-22 08:48:56 +04:00
commit 92a112cf15
No known key found for this signature in database
4 changed files with 5 additions and 10 deletions

View file

@ -36,11 +36,10 @@ defmodule Pleroma.Emails.Mailer do
def deliver(email, config \\ [])
def deliver(email, config) do
# temporary hackney fix until hackney max_connections bug is fixed
# https://git.pleroma.social/pleroma/pleroma/-/issues/2101
# Swoosh HTTP adapters use Hackney, which otherwise trusts its certifi bundle
email =
Swoosh.Email.put_private(email, :hackney_options,
ssl_options: Pleroma.HTTP.TLS.ssl_options(versions: [:"tlsv1.2"])
ssl_options: Pleroma.HTTP.TLS.ssl_options()
)
case enabled?() do

View file

@ -59,6 +59,6 @@ defmodule Pleroma.Emails.MailerTest do
assert_received {:email, %Swoosh.Email{private: %{hackney_options: hackney_options}}}
assert hackney_options[:ssl_options] ==
Pleroma.HTTP.TLS.ssl_options(versions: [:"tlsv1.2"])
Pleroma.HTTP.TLS.ssl_options()
end
end

View file

@ -531,10 +531,8 @@ defmodule Pleroma.UserTest do
ObanHelpers.perform_all()
Pleroma.Emails.UserEmail.account_confirmation_email(registered_user)
# temporary hackney fix until hackney max_connections bug is fixed
# https://git.pleroma.social/pleroma/pleroma/-/issues/2101
|> Swoosh.Email.put_private(:hackney_options,
ssl_options: Pleroma.HTTP.TLS.ssl_options(versions: [:"tlsv1.2"])
ssl_options: Pleroma.HTTP.TLS.ssl_options()
)
|> assert_email_sent()
end

View file

@ -1042,10 +1042,8 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
ObanHelpers.perform_all()
Pleroma.Emails.UserEmail.account_confirmation_email(first_user)
# temporary hackney fix until hackney max_connections bug is fixed
# https://git.pleroma.social/pleroma/pleroma/-/issues/2101
|> Swoosh.Email.put_private(:hackney_options,
ssl_options: Pleroma.HTTP.TLS.ssl_options(versions: [:"tlsv1.2"])
ssl_options: Pleroma.HTTP.TLS.ssl_options()
)
|> assert_email_sent()
end