-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Mailer] stream_socket_enable_crypto php warning about crypto type #31105
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
After reading the documentation and doing a test the third parameter should be |
Some background: https://wiki.php.net/rfc/improved-tls-defaults New Constants
Crypto method interpreted as “any client crypto method we can possibly support.” Applications may use this method for maximum compatibility with SSLv2, SSLv3, TLSv1, TLSv1.1 and TLSv1.2 servers.
Crypto method interpreted as “any server crypto method we can possibly support.” Applications may use this method for maximum compatibility with SSLv2, SSLv3, TLSv1, TLSv1.1 and TLSv1.2 clients.
Crypto method flag allowing specific TLSv1 usage in encrypted client streams.
Crypto method flag allowing specific TLSv1 usage in encrypted server streams.
Better to use |
My reasoning for not passing the third parameter is that it allows one to configure it from the outside via the SSL context options. |
@fabpot it looks like the 3rd parameter is mandatory as soon as I'm not an expert at this level but is there a way to ensure it's properly configured from the outside before calling the function? |
@bpolaszek Looks like you're right. Let's find the "best" option here. Would you like to work on a PR for this? |
@fabpot something like this? |
This PR was merged into the 4.3 branch. Discussion ---------- [Mailer] Set default crypto method | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #31105 | License | MIT | Doc PR | - This PR fixes #31105 by providing `STREAM_CRYPTO_METHOD_TLS_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT` as default crypto method when none is defined in user options and TLS is enabled. Commits ------- 4f0ad25 Set default crypto method - Fix #31105
* 4.3: [Console] Add check for Konsole/Yakuake to disable hyperlinks [HttpClient] work around PHP 7.3 bug related to json_encode() [VarDumper] fix dumping the cloner itself Rename the Symfony Mailer service config to avoid conflict with SwitMailer Set default crypto method - Fix #31105 [Form] add missing symfony/service-contracts dependency [HttpClient] Don't throw InvalidArgumentException on bad Location header
* 4.4: [Console] Add check for Konsole/Yakuake to disable hyperlinks [HTTP Foundation] Deprecate passing argument to method Request::isMethodSafe() [HttpClient] work around PHP 7.3 bug related to json_encode() [VarDumper] fix dumping the cloner itself Rename the Symfony Mailer service config to avoid conflict with SwitMailer Set default crypto method - Fix #31105 [Form] add missing symfony/service-contracts dependency [HttpClient] Don't throw InvalidArgumentException on bad Location header
Symfony version(s) affected:
4.3-dev
Description
When using the
EsmtpTransport
transport withtls
encryption I receive a PHP warning:How to reproduce
Possible Solution
Honestly I have no clue on how
stream_socket_enable_crypto
should work, sorry.The text was updated successfully, but these errors were encountered: