fix(mailer): keep certificate checks for Swoosh HTTP adapters
The TLS version override replaced all Hackney TLS defaults. On OTP 26+ this fails with cacerts: :undefined; on older OTP it skipped certificate checks. Closes #7962 on the public tracker.
This commit is contained in:
parent
d8c880e494
commit
830455d197
5 changed files with 19 additions and 3 deletions
|
|
@ -39,7 +39,9 @@ defmodule Pleroma.Emails.Mailer do
|
|||
# temporary hackney fix until hackney max_connections bug is fixed
|
||||
# https://git.pleroma.social/pleroma/pleroma/-/issues/2101
|
||||
email =
|
||||
Swoosh.Email.put_private(email, :hackney_options, ssl_options: [versions: [:"tlsv1.2"]])
|
||||
Swoosh.Email.put_private(email, :hackney_options,
|
||||
ssl_options: Pleroma.HTTP.TLS.ssl_options(versions: [:"tlsv1.2"])
|
||||
)
|
||||
|
||||
case enabled?() do
|
||||
true -> Swoosh.Mailer.deliver(email, parse_config(config))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue