-
Notifications
You must be signed in to change notification settings - Fork 374
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
TrustServerCertificate no longer working in v5.11.1 #1478
Comments
The new release accepts
|
Was this change documented somewhere? Previously |
I tried changing the values per your recommendation and I now get the following error:
It looks as though only the following works: 'Encrypt' => 'Yes',
'TrustServerCertificate' => 'True' Is this the expected behavior? It seems really odd for a point release to introduce this change without any release notes. |
This is not intended, looks like there's some inconsistency for the connection option. I'll look into a fix. |
I believe I have found the issue. It looks like https://github.com/microsoft/msphpsql/blob/servicing_v5.11.1/source/sqlsrv/conn.cpp#L456-L462 |
I may be incorrect but it seems like #1460 changed bool_conn_str_func from defaulting to True to defaulting to False. May it be that in 5.11.0 setting bool-options to "yes" and "no" was interpreted as True and now in 5.11.1 they are not? This should possibly be reported as a separate issue but MultiSubnetFailover also seems to be affected by this change. As https://www.php.net/manual/en/function.sqlsrv-connect.php refers to connectionOptions using the following link http://msdn.microsoft.com/en-us/library/ff628167.aspx in which MultiSubnetFailover is documented as a "yes/no" option it is a bit confusing. |
I'm thinking of accepting |
Sounds good! |
I'm good with that as long as it also supports the capital case variants of |
Please check the FAQ (frequently-asked questions) first. If you have other questions or something to report, please address the following (skipping questions might delay our responses):
PHP version
php:8.2.8-fpm-bullseye@sha256:a90c4f5aef3191ad245f59c3b607a9d7e9bc10ce96bf3e1066a9fd536304a4bf
PHP SQLSRV or PDO_SQLSRV version
v5.11.1
Microsoft ODBC Driver version
8.3.1.1-1
SQL Server version
mcr.microsoft.com/mssql/server:2019-CU20-ubuntu-20.04@sha256:5e67a797c69eba6382b1edd34de711cc03d4347dabefcc5a14fbca71e8214315
Client operating system
docker for mac
Problem description
When using encryption with a self-signed certificate, e.g.
is no longer working as of v5.11.1. Reverting back to v5.11.0 allows self-signed certificates to be used again.
Expected behavior and actual behavior
I get a self-signed certificate error indicating that
TrustServerCertificate
is being ignored. Downgrading to v5.11.0 causes the self-signed certificate error to go away with an otherwise identical config.Repro code or steps to reproduce
The text was updated successfully, but these errors were encountered: