diff --git a/docs/data-source-options.md b/docs/data-source-options.md index e8db9a5042..80a4b68676 100644 --- a/docs/data-source-options.md +++ b/docs/data-source-options.md @@ -378,6 +378,8 @@ Different RDBMS-es have their own specific options. - `options.appName` - Application name used for identifying a specific application in profiling, logging or tracing tools of SQL Server. (default: `node-mssql`) +- `options.trustServerCertificate` - A boolean, controlling whether encryption occurs if there is no verifiable server certificate. (default: `false`) + - `options.debug.packet` - A boolean, controlling whether `debug` events will be emitted with text describing packet details (default: `false`). diff --git a/src/driver/sqlserver/SqlServerConnectionOptions.ts b/src/driver/sqlserver/SqlServerConnectionOptions.ts index 6a68bf71ae..564511c91e 100644 --- a/src/driver/sqlserver/SqlServerConnectionOptions.ts +++ b/src/driver/sqlserver/SqlServerConnectionOptions.ts @@ -278,6 +278,12 @@ export interface SqlServerConnectionOptions * (default: node-mssql) */ readonly appName?: string + + /** + * A boolean, controlling whether encryption occurs if there is no verifiable server certificate. + * (default: false) + */ + readonly trustServerCertificate?: boolean } /**