Skip to content
Merged
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
2 changes: 1 addition & 1 deletion cloud-sql/sqlserver/client-side-encryption/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>9.4.1.jre8</version>
<version>10.2.0.jre8</version>
</dependency>
<dependency>
<groupId>com.google.crypto.tink</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ public static DataSource createConnectionPool(String dbUser, String dbPass, Stri
config.setPassword(dbPass); // e.g. "my-password"
config.addDataSourceProperty("databaseName", dbName);

// The Cloud SQL Java Connector provides SSL encryption so
// it should be disabled at the driver level
config.addDataSourceProperty("encrypt", "false");

config.addDataSourceProperty("socketFactoryClass",
"com.google.cloud.sql.sqlserver.SocketFactory");
config.addDataSourceProperty("socketFactoryConstructorArg", instanceConnectionName);
Expand All @@ -60,4 +64,4 @@ public static void createTable(DataSource pool, String tableName) throws SQLExce
}
}
}
// [END cloud_sql_sqlserver_cse_db]
// [END cloud_sql_sqlserver_cse_db]