mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-14 17:06:16 +00:00
Merge pull request #1859 from narfindustries/1501-ja-core-core
1501 ja core core
This commit is contained in:
commit
6543fb7fe5
@ -23,4 +23,9 @@ ServicesMonitor.unknownServiceName.excepton.txt=Requested service name {0} is un
|
|||||||
TextConverter.convert.exception.txt=Unable to convert text {0} to hex text
|
TextConverter.convert.exception.txt=Unable to convert text {0} to hex text
|
||||||
TextConverter.convertFromHex.exception.txt=Unable to convert hex text to text
|
TextConverter.convertFromHex.exception.txt=Unable to convert hex text to text
|
||||||
ServicesMonitor.KeywordSearchNull=Cannot find Keyword Search service
|
ServicesMonitor.KeywordSearchNull=Cannot find Keyword Search service
|
||||||
ServicesMonitor.InvalidPortNumber=Invalid port number.
|
ServicesMonitor.InvalidPortNumber=Invalid port number.
|
||||||
|
ServicesMonitor.remoteCaseDatabase.displayName.text=Multi-user case database service
|
||||||
|
ServicesMonitor.remoteKeywordSearch.displayName.text=Multi-user keyword search service
|
||||||
|
ServicesMonitor.messaging.displayName.text=Messaging service
|
||||||
|
ServicesMonitor.databaseConnectionInfo.error.msg=Error accessing case database connection info
|
||||||
|
ServicesMonitor.messagingService.connErr.text=Error accessing messaging service connection info
|
@ -123,9 +123,9 @@ public class Installer extends ModuleInstall {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// This library name is different in 32-bit versus 64-bit
|
// This library name is different in 32-bit versus 64-bit
|
||||||
String libintlName = "libintl-8";
|
String libintlName = "libintl-8"; //NON-NLS
|
||||||
if (PlatformUtil.is64BitJVM() == false) {
|
if (PlatformUtil.is64BitJVM() == false) {
|
||||||
libintlName = "intl";
|
libintlName = "intl"; //NON-NLS
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
System.loadLibrary(libintlName); //NON-NLS
|
System.loadLibrary(libintlName); //NON-NLS
|
||||||
|
@ -52,7 +52,7 @@ public class ServicesMonitor {
|
|||||||
private static final Logger logger = Logger.getLogger(ServicesMonitor.class.getName());
|
private static final Logger logger = Logger.getLogger(ServicesMonitor.class.getName());
|
||||||
private final ScheduledThreadPoolExecutor periodicTasksExecutor;
|
private final ScheduledThreadPoolExecutor periodicTasksExecutor;
|
||||||
|
|
||||||
private static final String PERIODIC_TASK_THREAD_NAME = "services-monitor-periodic-task-%d";
|
private static final String PERIODIC_TASK_THREAD_NAME = "services-monitor-periodic-task-%d"; //NON-NLS
|
||||||
private static final int NUMBER_OF_PERIODIC_TASK_THREADS = 1;
|
private static final int NUMBER_OF_PERIODIC_TASK_THREADS = 1;
|
||||||
private static final long CRASH_DETECTION_INTERVAL_MINUTES = 2;
|
private static final long CRASH_DETECTION_INTERVAL_MINUTES = 2;
|
||||||
|
|
||||||
@ -84,18 +84,18 @@ public class ServicesMonitor {
|
|||||||
* changes. New value is set to updated ServiceStatus, old value is
|
* changes. New value is set to updated ServiceStatus, old value is
|
||||||
* null.
|
* null.
|
||||||
*/
|
*/
|
||||||
REMOTE_CASE_DATABASE("Multi-user case database service"),
|
REMOTE_CASE_DATABASE(NbBundle.getMessage(ServicesMonitor.class, "ServicesMonitor.remoteCaseDatabase.displayName.text")),
|
||||||
/**
|
/**
|
||||||
* Property change event fired when remote keyword search service status
|
* Property change event fired when remote keyword search service status
|
||||||
* changes. New value is set to updated ServiceStatus, old value is
|
* changes. New value is set to updated ServiceStatus, old value is
|
||||||
* null.
|
* null.
|
||||||
*/
|
*/
|
||||||
REMOTE_KEYWORD_SEARCH("Multi-user keyword search service"),
|
REMOTE_KEYWORD_SEARCH(NbBundle.getMessage(ServicesMonitor.class, "ServicesMonitor.remoteKeywordSearch.displayName.text")),
|
||||||
/**
|
/**
|
||||||
* Property change event fired when messaging service status changes.
|
* Property change event fired when messaging service status changes.
|
||||||
* New value is set to updated ServiceStatus, old value is null.
|
* New value is set to updated ServiceStatus, old value is null.
|
||||||
*/
|
*/
|
||||||
MESSAGING("Messaging service");
|
MESSAGING(NbBundle.getMessage(ServicesMonitor.class, "ServicesMonitor.messaging.displayName.text"));
|
||||||
|
|
||||||
private final String displayName;
|
private final String displayName;
|
||||||
|
|
||||||
@ -244,7 +244,7 @@ public class ServicesMonitor {
|
|||||||
info = UserPreferences.getDatabaseConnectionInfo();
|
info = UserPreferences.getDatabaseConnectionInfo();
|
||||||
} catch (UserPreferencesException ex) {
|
} catch (UserPreferencesException ex) {
|
||||||
logger.log(Level.SEVERE, "Error accessing case database connection info", ex); //NON-NLS
|
logger.log(Level.SEVERE, "Error accessing case database connection info", ex); //NON-NLS
|
||||||
setServiceStatus(Service.REMOTE_CASE_DATABASE.toString(), ServiceStatus.DOWN.toString(), "Error accessing case database connection info");
|
setServiceStatus(Service.REMOTE_CASE_DATABASE.toString(), ServiceStatus.DOWN.toString(), NbBundle.getMessage(this.getClass(), "ServicesMonitor.databaseConnectionInfo.error.msg"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
@ -289,7 +289,7 @@ public class ServicesMonitor {
|
|||||||
info = UserPreferences.getMessageServiceConnectionInfo();
|
info = UserPreferences.getMessageServiceConnectionInfo();
|
||||||
} catch (UserPreferencesException ex) {
|
} catch (UserPreferencesException ex) {
|
||||||
logger.log(Level.SEVERE, "Error accessing messaging service connection info", ex); //NON-NLS
|
logger.log(Level.SEVERE, "Error accessing messaging service connection info", ex); //NON-NLS
|
||||||
setServiceStatus(Service.MESSAGING.toString(), ServiceStatus.DOWN.toString(), "Error accessing messaging service connection info");
|
setServiceStatus(Service.MESSAGING.toString(), ServiceStatus.DOWN.toString(), NbBundle.getMessage(this.getClass(), "ServicesMonitor.messagingService.connErr.text"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ public final class UserPreferences {
|
|||||||
public static CaseDbConnectionInfo getDatabaseConnectionInfo() throws UserPreferencesException {
|
public static CaseDbConnectionInfo getDatabaseConnectionInfo() throws UserPreferencesException {
|
||||||
DbType dbType;
|
DbType dbType;
|
||||||
try {
|
try {
|
||||||
dbType = DbType.valueOf(preferences.get(EXTERNAL_DATABASE_TYPE, "POSTGRESQL"));
|
dbType = DbType.valueOf(preferences.get(EXTERNAL_DATABASE_TYPE, "POSTGRESQL")); //NON-NLS
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
dbType = DbType.SQLITE;
|
dbType = DbType.SQLITE;
|
||||||
}
|
}
|
||||||
@ -290,7 +290,7 @@ public final class UserPreferences {
|
|||||||
*/
|
*/
|
||||||
static final class TextConverter {
|
static final class TextConverter {
|
||||||
|
|
||||||
private static final char[] TMP = "hgleri21auty84fwe".toCharArray();
|
private static final char[] TMP = "hgleri21auty84fwe".toCharArray(); //NON-NLS
|
||||||
private static final byte[] SALT = {
|
private static final byte[] SALT = {
|
||||||
(byte) 0xde, (byte) 0x33, (byte) 0x10, (byte) 0x12,
|
(byte) 0xde, (byte) 0x33, (byte) 0x10, (byte) 0x12,
|
||||||
(byte) 0xde, (byte) 0x33, (byte) 0x10, (byte) 0x12,};
|
(byte) 0xde, (byte) 0x33, (byte) 0x10, (byte) 0x12,};
|
||||||
@ -306,9 +306,9 @@ public final class UserPreferences {
|
|||||||
*/
|
*/
|
||||||
static String convertTextToHexText(String property) throws UserPreferencesException {
|
static String convertTextToHexText(String property) throws UserPreferencesException {
|
||||||
try {
|
try {
|
||||||
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("PBEWithMD5AndDES");
|
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("PBEWithMD5AndDES"); //NON-NLS
|
||||||
SecretKey key = keyFactory.generateSecret(new PBEKeySpec(TMP));
|
SecretKey key = keyFactory.generateSecret(new PBEKeySpec(TMP));
|
||||||
Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES");
|
Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES"); //NON-NLS
|
||||||
pbeCipher.init(Cipher.ENCRYPT_MODE, key, new PBEParameterSpec(SALT, 20));
|
pbeCipher.init(Cipher.ENCRYPT_MODE, key, new PBEParameterSpec(SALT, 20));
|
||||||
return base64Encode(pbeCipher.doFinal(property.getBytes("UTF-8")));
|
return base64Encode(pbeCipher.doFinal(property.getBytes("UTF-8")));
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
@ -332,9 +332,9 @@ public final class UserPreferences {
|
|||||||
*/
|
*/
|
||||||
static String convertHexTextToText(String property) throws UserPreferencesException {
|
static String convertHexTextToText(String property) throws UserPreferencesException {
|
||||||
try {
|
try {
|
||||||
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("PBEWithMD5AndDES");
|
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("PBEWithMD5AndDES"); //NON-NLS
|
||||||
SecretKey key = keyFactory.generateSecret(new PBEKeySpec(TMP));
|
SecretKey key = keyFactory.generateSecret(new PBEKeySpec(TMP));
|
||||||
Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES");
|
Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES"); //NON-NLS
|
||||||
pbeCipher.init(Cipher.DECRYPT_MODE, key, new PBEParameterSpec(SALT, 20));
|
pbeCipher.init(Cipher.DECRYPT_MODE, key, new PBEParameterSpec(SALT, 20));
|
||||||
return new String(pbeCipher.doFinal(base64Decode(property)), "UTF-8");
|
return new String(pbeCipher.doFinal(base64Decode(property)), "UTF-8");
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user