Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ const (
DefaultInfluxDBTimeOut int = 0
DefaultInfluxDBDatabase string = "SQLSERVER"
DefaultInfluxDBPrecision string = "ms"

DefaultServerEncrypt bool = false
DefaultServerTrustServerCertificate bool = false
)

type TOMLConfig struct {
Expand Down Expand Up @@ -65,6 +68,8 @@ type Server struct {
Port int
Username string
Password string
Encrypt bool
TrustServerCertificate bool
}
type script struct {
Name string
Expand Down
4 changes: 2 additions & 2 deletions influxdb-sqlserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ func init() {
//
func connectionString(server cfg.Server) string {
return fmt.Sprintf(
"Server=%s;Port=%v;User Id=%s;Password=%s;app name=influxdb-sqlserver;log=1",
server.IP, server.Port, server.Username, server.Password)
"Server=%s;Port=%v;User Id=%s;Password=%s;app name=influxdb-sqlserver;log=1;Encrypt=%t;Trust Server Certificate=%t;",
server.IP, server.Port, server.Username, server.Password, server.Encrypt, server.TrustServerCertificate)
}

//
Expand Down