Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[Mailer][Mime] Refactor S/MIME encryption handling inSMimeEncryptionListener
#59831
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
c3a8318
toeb8e560
CompareUh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Mailer/EventListener/SmimeEncryptedMessageListener.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
204c36f
to6499c8a
CompareReplaces direct certificate path usage with a repository interface for managing S/MIME certificates. This improves flexibility by allowing custom certificate retrieval logic through `SmimeCertificateRepositoryInterface`. Adjusted related tests, configuration, and event listener implementation accordingly.
6499c8a
to7c76c54
CompareSpomky commentedFeb 22, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
It is important to mention in the documentation that caution should be exercised when sending encrypted emails to multiple recipients. And indeed, all recipients are used here and therefore the main recipients as well as those in BCC. It is therefore possible to know these recipients depending on the encryption method used. |
@@ -2314,8 +2314,8 @@ private function addMailerSection(ArrayNodeDefinition $rootNode, callable $enabl | |||
->canBeEnabled() | |||
->info('S/MIME encrypter configuration') | |||
->children() | |||
->scalarNode('certificate') | |||
->info('Path to certificate (in PEM format without the `file://` prefix)') | |||
->scalarNode('repository') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
For reviewers, this change is fine as this feature has been introduced in 7.3, so not yet released
SMimeEncryptionListener
SMimeEncryptionListener
SMimeEncryptionListener
Thank you@Spomky. |
7100c7b
intosymfony:7.3Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
It appears that the smime_encrypter introduced in#58501 is incorrect, as the email is encrypted only for the sender instead of being encrypted per recipient.
This PR introduces a new
SmimeCertificateRepositoryInterface
, responsible for retrieving recipient certificates.An email is encrypted under the following conditions:
X-SMime-Encrypt
is present.If either of these conditions is not met, the email is sent unencrypted.
Example of usage: