Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Sleuthkit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IRT
Sleuthkit
Commits
2a0262de
Commit
2a0262de
authored
1 year ago
by
eugene.livis
Browse files
Options
Downloads
Patches
Plain Diff
Improvements
parent
189e16e5
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bindings/java/src/org/sleuthkit/datamodel/SleuthkitCase.java
+6
-6
6 additions, 6 deletions
bindings/java/src/org/sleuthkit/datamodel/SleuthkitCase.java
with
6 additions
and
6 deletions
bindings/java/src/org/sleuthkit/datamodel/SleuthkitCase.java
+
6
−
6
View file @
2a0262de
...
@@ -113,8 +113,8 @@ public class SleuthkitCase {
...
@@ -113,8 +113,8 @@ public class SleuthkitCase {
private static final int IS_REACHABLE_TIMEOUT_MS = 1000;
private static final int IS_REACHABLE_TIMEOUT_MS = 1000;
private static final String SQL_ERROR_CONNECTION_GROUP = "08";
private static final String SQL_ERROR_CONNECTION_GROUP = "08";
// either one of these mean connection was rejected by Postgres server
// either one of these mean connection was rejected by Postgres server
private static final String SQL_CONNECTION_REJECTED
_1
= "08004";
private static final String SQL_CONNECTION_REJECTED = "08004";
private static final String
SQL_CONNECTION_REJECTED_2
= "08006";
private static final String
UNABLE_TO_VERIFY_SSL
= "08006";
private static final String SQL_ERROR_AUTHENTICATION_GROUP = "28";
private static final String SQL_ERROR_AUTHENTICATION_GROUP = "28";
private static final String SQL_ERROR_PRIVILEGE_GROUP = "42";
private static final String SQL_ERROR_PRIVILEGE_GROUP = "42";
...
@@ -313,15 +313,15 @@ public static void tryConnect(CaseDbConnectionInfo info) throws TskCoreException
...
@@ -313,15 +313,15 @@ public static void tryConnect(CaseDbConnectionInfo info) throws TskCoreException
} catch (SQLException ex) {
} catch (SQLException ex) {
String result;
String result;
String sqlState = ex.getSQLState().toLowerCase();
String sqlState = ex.getSQLState().toLowerCase();
if (sqlState.startsWith(SQL_ERROR_CONNECTION_GROUP)) {
if (sqlState.startsWith(SQL_ERROR_CONNECTION_GROUP)) {
if (SQL_CONNECTION_REJECTED.equals(ex.getSQLState())) {
if (SQL_CONNECTION_REJECTED_1.equals(ex.getSQLState()) ||
SQL_CONNECTION_REJECTED_2.equals(ex.getSQLState())) {
if (info.isSslEnabled()) {
if (info.isSslEnabled()) {
result = "Server rejected the SSL connection attempt. Check SSL configuration.";
result = "Server rejected the SSL connection attempt. Check SSL configuration.";
} else {
} else {
result = "Server rejected the connection attempt. Check server configuration.";
result = "Server rejected the connection attempt. Check server configuration.";
}
}
} else if (UNABLE_TO_VERIFY_SSL.equals(ex.getSQLState())) {
result = "Unable to verify SSL certificates. Check SSL configuration.";
} else {
} else {
try {
try {
if (InetAddress.getByName(info.getHost()).isReachable(IS_REACHABLE_TIMEOUT_MS)) {
if (InetAddress.getByName(info.getHost()).isReachable(IS_REACHABLE_TIMEOUT_MS)) {
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment