You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Curl error: 60 - SSL certificate problem: unable to get local issuer certificate
PHP Fatal error: Uncaught PDOException: SQLSTATE[08S01]: [Microsoft][ODBC Driver 18 for SQL Server]SSL Provider: [error:140E0197:SSL routines:SSL_shutdown:shutdown while in init] in /data/test.php:30
Stack trace:
0 /data/test.php(30): PDO->rollBack()
1 {main}
thrown in /data/test.php on line 30
But I expected no SQL error, only the cURL error :
Curl error: 60 - SSL certificate problem: unable to get local issuer certificate // no SQL error
The error only happens when the curl CA verification reports a certificate not allowed.
The error does not happen when I remove TrustServerCertificate=yes in the dsn.
The error does not happen when CURLOPT_SSL_VERIFYPEER is set to false.
It's seems that the Mssql driver call openssl function SSL_shutdown() while SSL_in_init() send true.
The SSL_in_init() seems to return true only when the curl CA verification reports a certificate not allowed.
I don't know if php curl implementation does not close the connection correctly or if the MSSQL driver should check if SSL_in_init() returns true before calling SSL_shutdown(), but there is something wrong here.
The text was updated successfully, but these errors were encountered:
From the code you've provided, it looks like the problem is with pdo_sqlsrv. Could you please report the problem in the following repository? https://github.com/microsoft/msphpsql
I'll close this issue, but we can always reopen it if necessary.
Description
Php version: 8.2.19
Driver SQL: pdo_sqlsrv-5.12.0
MSSQL version: 2022 (16.x)
Ubuntu via Docker for Mac: Ubuntu 22.04.4 LTS (Jammy Jellyfish)
The following code:
Resulted in this output:
But I expected no SQL error, only the cURL error :
The error only happens when the curl CA verification reports a certificate not allowed.
The error does not happen when I remove
TrustServerCertificate=yes
in the dsn.The error does not happen when
CURLOPT_SSL_VERIFYPEER
is set tofalse
.It's seems that the Mssql driver call openssl function
SSL_shutdown()
whileSSL_in_init()
send true.The
SSL_in_init()
seems to returntrue
only when the curl CA verification reports a certificate not allowed.I don't know if php curl implementation does not close the connection correctly or if the MSSQL driver should check if SSL_in_init() returns
true
before callingSSL_shutdown()
, but there is something wrong here.The text was updated successfully, but these errors were encountered: