Skip to content
Snippets Groups Projects
Commit bc1992c3 authored by eugene.livis's avatar eugene.livis
Browse files

More work

parent 6566119b
No related branches found
No related tags found
No related merge requests found
...@@ -718,7 +718,8 @@ Connection getConnection(String databaseName) throws TskCoreException { ...@@ -718,7 +718,8 @@ Connection getConnection(String databaseName) throws TskCoreException {
// NonValidatingFactory avoids hostname verification. // NonValidatingFactory avoids hostname verification.
// sslmode=require: This mode makes the encryption mandatory and also requires the connection to fail if it cant be encrypted. // sslmode=require: This mode makes the encryption mandatory and also requires the connection to fail if it cant be encrypted.
// In this mode, the JDBC driver accepts all server certificates. // In this mode, the JDBC driver accepts all server certificates.
url.append("?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory&sslmode=require"); //url.append("?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory&sslmode=require");
url.append("?ssl=true&sslfactory=org.postgresql.ssl.DefaultJavaSSLFactory&sslmode=verify-ca");
} }
Connection conn; Connection conn;
......
...@@ -299,7 +299,8 @@ public static void tryConnect(CaseDbConnectionInfo info) throws TskCoreException ...@@ -299,7 +299,8 @@ public static void tryConnect(CaseDbConnectionInfo info) throws TskCoreException
// NonValidatingFactory avoids hostname verification. // NonValidatingFactory avoids hostname verification.
// sslmode=require: This mode makes the encryption mandatory and also requires the connection to fail if it cant be encrypted. // sslmode=require: This mode makes the encryption mandatory and also requires the connection to fail if it cant be encrypted.
// In this mode, the JDBC driver accepts all server certificates. // In this mode, the JDBC driver accepts all server certificates.
connectionURL += "?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory&sslmode=require"; //connectionURL += "?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory&sslmode=require";
connectionURL += "?ssl=true&sslfactory=org.postgresql.ssl.DefaultJavaSSLFactory&sslmode=verify-ca";
} }
Connection conn = DriverManager.getConnection(connectionURL, info.getUserName(), info.getPassword()); //NON-NLS Connection conn = DriverManager.getConnection(connectionURL, info.getUserName(), info.getPassword()); //NON-NLS
if (conn != null) { if (conn != null) {
...@@ -13410,7 +13411,8 @@ private final class PostgreSQLConnections extends ConnectionPool { ...@@ -13410,7 +13411,8 @@ private final class PostgreSQLConnections extends ConnectionPool {
// NonValidatingFactory avoids hostname verification. // NonValidatingFactory avoids hostname verification.
// sslmode=require: This mode makes the encryption mandatory and also requires the connection to fail if it cant be encrypted. // sslmode=require: This mode makes the encryption mandatory and also requires the connection to fail if it cant be encrypted.
// In this mode, the JDBC driver accepts all server certificates. // In this mode, the JDBC driver accepts all server certificates.
connectionURL += "?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory&sslmode=require"; //connectionURL += "?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory&sslmode=require";
connectionURL += "?ssl=true&sslfactory=org.postgresql.ssl.DefaultJavaSSLFactory&sslmode=verify-ca";
} }
comboPooledDataSource.setJdbcUrl(connectionURL); comboPooledDataSource.setJdbcUrl(connectionURL);
comboPooledDataSource.setUser(info.getUserName()); comboPooledDataSource.setUser(info.getUserName());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment