tediousjs / tedious

Node TDS module for connecting to SQL Server databases.

Home Page:http://tediousjs.github.io/tedious/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Warning for not setting config.options.trustServerCertificate when config.options.encrypt set to false

akc42 opened this issue · comments

My options config specifically says config.options.encrypt set to false, but I am still getting node warnings in my log about not explicitly settingconfig.options.trustServerCertificate surely it should need to have been set if I am not encrypting the connection

HI @akc42, the warning message is related to #1361. Currently, the config.options.trustServerCertificate option defaults to true, but is going to be changed to false in the future. If you explicitly set a value for config.options.trustServerCertificate it will stop emitting that warning message. The warning will emit for any config without it set, regardless of what the other config options are set to.

Yes but if config.options.encrypt is set to false then the actual value of config.options.trustServerCertificate is mute because what ever setting it has is irrelevant. So the warning message doesn't make sense in this scenario.

I agree that tedious probably should skip the deprecation warning in your scenario. Given the ease of modifying the config file to include the option to get rid of the warning, I think making this change is a pretty low priority. However, if you want to submit a code change for it, feel free.