Skip to content

Commit

Permalink
Add configuration option to select truststore
Browse files Browse the repository at this point in the history
  • Loading branch information
sake committed May 29, 2015
1 parent 9f6dce6 commit 4bd16f5
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/****************************************************************************
* Copyright (C) 2015 ecsec GmbH.
* All rights reserved.
* Contact: ecsec GmbH (info@ecsec.de)
*
* This file is part of the Open eCard App.
*
* GNU General Public License Usage
* This file may be used under the terms of the GNU General Public
* License version 3.0 as published by the Free Software Foundation
* and appearing in the file LICENSE.GPL included in the packaging of
* this file. Please review the following information to ensure the
* GNU General Public License version 3.0 requirements will be met:
* http://www.gnu.org/copyleft/gpl.html.
*
* Other Usage
* Alternatively, this file may be used in accordance with the terms
* and conditions contained in a signed written agreement between
* you and ecsec GmbH.
*
***************************************************************************/

package org.openecard.richclient.gui.manage.core;

import java.io.IOException;
import org.openecard.addon.AddonPropertiesException;
import org.openecard.common.I18n;
import org.openecard.crypto.tls.verify.TrustStoreLoader;


/**
* Custom settings group for security settings.
*
* @author Tobias Wich
*/
public class ConnectionSettingsSecurityGroup extends OpenecardPropertiesSettingsGroup {

private static final long serialVersionUID = 1L;
private static final I18n lang = I18n.getTranslation("addon");
private static final String GROUP = "addon.list.core.general.security.group_name";
private static final String SYS_TRUSTSTORE = "addon.list.core.general.security.truststore-use-system";
private static final String SYS_TRUSTSTORE_DESC= "addon.list.core.general.security.truststore-use-system.desc";


public ConnectionSettingsSecurityGroup() {
super(lang.translationForKey(GROUP));

addBoolItem(lang.translationForKey(SYS_TRUSTSTORE), lang.translationForKey(SYS_TRUSTSTORE_DESC),
"tls.truststore.use-system");
}

@Override
protected void saveProperties() throws IOException, SecurityException, AddonPropertiesException {
super.saveProperties();
// reload truststore
TrustStoreLoader.load();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* This panel hosts the following settings groups:
* <ul>
* <li>Proxy</li>
* <li>Security</li>
* </ul>
*
* @author Tobias Wich
Expand All @@ -44,6 +45,7 @@ public class ConnectionsSettingsPanel extends SettingsPanel {
public ConnectionsSettingsPanel() {
proxy = new ConnectionSettingsGroup();
addSettingsGroup(proxy);
addSettingsGroup(new ConnectionSettingsSecurityGroup());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ addon.list.core.general = General Settings
addon.list.core.general.notification.group_name = Notification
addon.list.core.general.notification.omit_show_remove_card = No "Remove Card" Dialog
addon.list.core.general.notification.omit_show_remove_card.desc = Do not show a remove card dialog after finishing the authentication with the card.
addon.list.core.general.security.group_name = Security
addon.list.core.general.security.truststore-use-system = Use System Truststore
addon.list.core.general.security.truststore-use-system.desc = Use the Java System Truststore instead of the bundled one.
addon.list.core.general.legacy.group_name = Legacy Behaviour
addon.list.core.general.legacy.tls1 = TLS 1.0
addon.list.core.general.legacy.tls1.desc = Allow the use of TLS version 1.0.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ addon.list.core.general = Allgemeine Einstellungen
addon.list.core.general.notification.group_name = Benachrichtigungen
addon.list.core.general.notification.omit_show_remove_card = Kein "Karte entfernen" Dialog
addon.list.core.general.notification.omit_show_remove_card.desc = Zeige keinen Karte entfernen Dialog nach Beendigung der Authentisierung an.
addon.list.core.general.security.group_name = Sicherheit
addon.list.core.general.security.truststore-use-system = System Truststore verwenden
addon.list.core.general.security.truststore-use-system.desc = Den Java System Truststore statt dem integrierten Truststore verwenden..
addon.list.core.general.legacy.group_name = Legacy Verhalten
addon.list.core.general.legacy.tls1 = TLS 1.0
addon.list.core.general.legacy.tls1.desc = Die Verwendung von TLS Version 1.0 zulassen.
Expand Down

0 comments on commit 4bd16f5

Please sign in to comment.