Encrypt MS SQL connection using SSL

More
2 months 3 weeks ago #174062 by efingdmi
efingdmi created the topic: Encrypt MS SQL connection using SSL
Hi all,

does anybody know how to encrypt the connection to my SQL Server 2016 with SSL?

I know this is more a Yii framework question but I almost spent a whole day and I still have no idea.

Thanks :)

Please Log in or Create an account to join the conversation.

More
2 months 3 weeks ago - 2 months 3 weeks ago #174087 by jelo
jelo replied the topic: Encrypt MS SQL connection using SSL
I'm using LimeSurvey with MS SQLServer, so I cannot test my recommendation ;-)

SQL Server are using certain flags, which enforce encryption and cert checking.

Encrypt-Specifies whether the communication with SQL Server is encrypted (1 or TRUE) or unencrypted (0 or FALSE).

TrustServerCertificate - Specifies whether the client should trust (1 or TRUE) or reject (0 or FALSE) a self-signed server certificate.


The complete options:
docs.microsoft.com/en-us/sql/connect/php...view=sql-server-2016


A simple PHP code would look like this:
$connectionInfo = array( "Database"=>"DbName",
                         "UID"=>"UserName",
                         "PWD"=>"Password",
                         "Encrypt"=>true,
                         "TrustServerCertificate"=>false);
$conn = sqlsrv_connect( $serverName, $connectionInfo);

secure.php.net/manual/en/ref.pdo-sqlsrv.connection.php
docs.microsoft.com/en-us/sql/connect/php...view=sql-server-2016

Are you a student conducting a survey? If yes, tell me why you use LimeSurvey?
www.limesurvey.org/forum/development/116...y-you-use-limesurvey
Last Edit: 2 months 3 weeks ago by jelo.
The following user(s) said Thank You: DenisChenu, efingdmi

Please Log in or Create an account to join the conversation.

More
2 months 3 weeks ago #174091 by efingdmi
efingdmi replied the topic: Encrypt MS SQL connection using SSL
Hi Jelo,

thanks for the answer. You are totaly right. I had the solution right in front of my eyes but I insert the Encrypt => true, on the wrong place... Wasted a couple of hours -.-

Thanks :)

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!