2626
2727import org .piwigo .remotesync .api .conf .SyncConfiguration ;
2828
29- public class ProxyUI extends JFrame {
29+ public class OptionsUI extends JFrame {
3030
3131 private static final long serialVersionUID = -7945236553585527567L ;
3232
@@ -36,12 +36,13 @@ public class ProxyUI extends JFrame {
3636 private JTextField proxyLogintextField ;
3737 private JTextField proxyPasswordtextField ;
3838 private JCheckBox chckbxUseProxy ;
39+ private JCheckBox chckbxISSSC ;
3940
4041 public static void run (final SyncConfiguration syncConfiguration ) {
4142 EventQueue .invokeLater (new Runnable () {
4243 public void run () {
4344 try {
44- ProxyUI frame = new ProxyUI (syncConfiguration );
45+ OptionsUI frame = new OptionsUI (syncConfiguration );
4546 frame .chckbxUseProxy .setSelected (false );
4647 frame .disableTextFields ();
4748 frame .setVisible (true );
@@ -57,7 +58,7 @@ public void run() {
5758 *
5859 * @param syncConfiguration
5960 */
60- public ProxyUI (final SyncConfiguration syncConfiguration ) {
61+ public OptionsUI (final SyncConfiguration syncConfiguration ) {
6162 setDefaultCloseOperation (JFrame .HIDE_ON_CLOSE );
6263 setBounds (100 , 100 , 450 , 300 );
6364 contentPane = new JPanel ();
@@ -110,6 +111,10 @@ public void stateChanged(ChangeEvent e) {
110111 contentPane .add (proxyPasswordtextField );
111112 proxyPasswordtextField .setColumns (10 );
112113
114+ chckbxISSSC = new JCheckBox ("Ignore self signed SSL certificates" );
115+ chckbxISSSC .setBounds (8 , 170 , 300 , 23 );
116+ contentPane .add (chckbxISSSC );
117+
113118 addWindowListener (new WindowAdapter () {
114119 @ Override
115120 public void windowClosing (WindowEvent e ) {
@@ -119,6 +124,7 @@ public void windowClosing(WindowEvent e) {
119124 syncConfiguration .setProxyPort (proxyPorttextField .getText ());
120125 syncConfiguration .setProxyUsername (proxyLogintextField .getText ());
121126 syncConfiguration .setProxyPassword (proxyPasswordtextField .getText ());
127+ syncConfiguration .setIgnoreSelfSignedSSLCertificate (Boolean .toString (chckbxISSSC .isSelected ()));
122128 }
123129
124130 @ Override
@@ -129,6 +135,7 @@ public void windowOpened(WindowEvent e) {
129135 proxyPorttextField .setText (syncConfiguration .getProxyPort () + "" );
130136 proxyLogintextField .setText (syncConfiguration .getProxyUsername ());
131137 proxyPasswordtextField .setText (syncConfiguration .getProxyPassword ());
138+ chckbxISSSC .setSelected (syncConfiguration .getIgnoreSelfSignedSSLCertificate ());
132139 }
133140
134141 });
0 commit comments