You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2015/01/21 20:48:38 UTC
svn commit: r1653636 -
/directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/
Author: elecharny
Date: Wed Jan 21 19:48:38 2015
New Revision: 1653636
URL: http://svn.apache.org/r1653636
Log:
o Added an enum for all the supported Java 7 and Java 8 ciphers
o Refactored the cipher table
Need to be done : add a Java selector (7 or 8) to inject the right version of Java cipher list in the server configuration. We currently default to Java 8, which is not correct.
Added:
directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/SupportedCipher.java
Modified:
directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java
directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages.properties
directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages_de.properties
directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages_fr.properties
Modified: directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java?rev=1653636&r1=1653635&r2=1653636&view=diff
==============================================================================
--- directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java (original)
+++ directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java Wed Jan 21 19:48:38 2015
@@ -35,10 +35,14 @@ import org.apache.directory.server.confi
import org.apache.directory.server.config.beans.SaslMechHandlerBean;
import org.apache.directory.server.config.beans.TcpTransportBean;
import org.apache.directory.server.config.beans.TransportBean;
+import org.apache.directory.studio.common.ui.CommonUIUtils;
import org.eclipse.jface.dialogs.InputDialog;
import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.CheckStateChangedEvent;
+import org.eclipse.jface.viewers.CheckboxTableViewer;
import org.eclipse.jface.viewers.ComboViewer;
import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.ICheckStateListener;
import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.LabelProvider;
@@ -58,6 +62,7 @@ import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Section;
@@ -105,12 +110,12 @@ import org.eclipse.ui.forms.widgets.Tabl
* | | | [X] Require Client Auth | | | | |
* | | | [X] Request Client Auth | | | | |
* | | | Ciphers suite : | | | | |
- * | | | +-----------------+ | | | | |
- * | | | | | (add) | | | | |
- * | | | | | (edit) | | | | |
- * | | | | | (delete) | | | | |
- * | | | +-----------------+ | | | | |
- * | | | Enabled protocols : | | | | |
+ * | | | +--------------------------+ | | | | |
+ * | | | |[X] xyz | | | | | |
+ * | | | |[X] abc | | | | | |
+ * | | | |[X] def | | | | | |
+ * | | | +--------------------------+ | | | | |
+ * | | | Enabled protocols : | | | | |
* | | | [X] SSLv3 [X] TLSv1 | | | | |
* | | | [X] TLSv1.1 [X] TLSv1.2 | | | | |
* | | +--------------------------------+ | | | |
@@ -197,10 +202,7 @@ public class LdapLdapsServersPage extend
private boolean wantClientAuthStatus;
/** The CiphersSuite controls */
- private TableViewer ciphersSuiteTableViewer;
- private Button addCiphersSuiteButton;
- private Button editCiphersSuiteButton;
- private Button deleteCiphersSuiteButton;
+ private CheckboxTableViewer ciphersSuiteTableViewer;
/** The EnabledProtocols controls */
private Button sslv3Checkbox;
@@ -372,9 +374,6 @@ public class LdapLdapsServersPage extend
setEnabled( needClientAuthCheckbox, enabled );
setEnabled( wantClientAuthCheckbox, enabled );
setEnabled( ciphersSuiteTableViewer.getTable(), enabled );
- setEnabled( addCiphersSuiteButton, enabled );
- setEnabled( deleteCiphersSuiteButton, enabled );
- setEnabled( editCiphersSuiteButton, enabled );
setEnabled( sslv3Checkbox, enabled );
setEnabled( tlsv1_0Checkbox, enabled );
setEnabled( tlsv1_1Checkbox, enabled );
@@ -951,84 +950,60 @@ public class LdapLdapsServersPage extend
/**
* Ciphers Suite Table change
*/
- private ISelectionChangedListener ciphersSuiteTableViewerSelectionChangedListener = new ISelectionChangedListener()
+ private ICheckStateListener ciphersSuiteTableViewerListener = new ICheckStateListener()
{
- public void selectionChanged( SelectionChangedEvent event )
+ public void checkStateChanged( CheckStateChangedEvent event )
{
- StructuredSelection selection = ( StructuredSelection ) ciphersSuiteTableViewer.getSelection();
-
- editCiphersSuiteButton.setEnabled( !selection.isEmpty() );
- deleteCiphersSuiteButton.setEnabled( !selection.isEmpty() );
- }
- };
-
-
- /**
- * Ciphers Suite Table double-click
- */
- private IDoubleClickListener ciphersSuiteTableViewerDoubleClickListener = new IDoubleClickListener()
- {
- public void doubleClick( DoubleClickEvent event )
- {
- editCiphersSuiteAction();
- }
- };
-
+ TransportBean transport = getLdapTransportBean( TRANSPORT_ID_LDAP );
+
+ if ( transport == null )
+ {
+ transport = getLdapTransportBean( TRANSPORT_ID_LDAPS );
+ }
+
+ if ( transport == null )
+ {
+ // TODO : the list should be disabled
+ return;
+ }
+
+ // Checking if the last cipher is being unchecked
+ if ( transport.getEnabledCiphers() == null )
+ {
+ // Ok, we don't have any selected cipher, which means all of them are selected
+ transport.setEnabledCiphers( SupportedCipher.supportedCipherNamesJava8 );
+ }
+ if ( ( transport.getEnabledCiphers().size() == 1 ) && ( event.getChecked() == false ) )
+ {
+ // Displaying an error to the user
+ CommonUIUtils.openErrorDialog( Messages
+ .getString( "LdapLdapsServersPage.AtLeastOneCipherMustBeSelected" ) );
- /**
- * Add Ciphers Suite button
- */
- private SelectionListener addCiphersSuiteButtonListener = new SelectionAdapter()
- {
- public void widgetSelected( SelectionEvent e )
- {
- InputDialog dialog = new InputDialog( editCiphersSuiteButton.getShell(),
- Messages.getString( "LdapLdapsServersPage.Add" ), //$NON-NLS-1$
- Messages.getString( "LdapLdapsServersPage.CiphersSuite" ), //$NON-NLS-1$
- null, null );
+ // Reverting the current checked state
+ ciphersSuiteTableViewer.setChecked( event.getElement(), !event.getChecked() );
- if ( dialog.open() == InputDialog.OK )
- {
- String newCipher = dialog.getValue();
+ // Exiting
+ return;
+ }
- getLdapServerBean().addEnabledCipherSuites( newCipher );
+ // Setting the editor as dirty
+ setEditorDirty();
- ciphersSuiteTableViewer.refresh();
- ciphersSuiteTableViewer.setSelection( new StructuredSelection( newCipher ) );
+ // Clearing previous cipher suite
+ transport.getEnabledCiphers().clear();
- setEditorDirty();
- }
- }
- };
-
-
- /**
- * Edit Ciphers Suite button
- */
- private SelectionListener editCiphersSuiteButtonListener = new SelectionAdapter()
- {
- public void widgetSelected( SelectionEvent e )
- {
- editCiphersSuiteAction();
- }
- };
-
-
- /**
- * Delete Ciphers Suite button
- */
- private SelectionListener deleteCiphersSuiteButtonListener = new SelectionAdapter()
- {
- public void widgetSelected( SelectionEvent e )
- {
- String selectedCiphersSuite = getSelectedCiphersSuite();
+ // Getting all selected encryption types
+ Object[] selectedCipherObjects = ciphersSuiteTableViewer.getCheckedElements();
- if ( selectedCiphersSuite != null )
+ // Adding each selected cipher
+ for ( Object cipher : selectedCipherObjects )
{
- getLdapServerBean().getEnabledCipherSuites().remove( selectedCiphersSuite );
- ciphersSuiteTableViewer.refresh();
+ if ( cipher instanceof SupportedCipher )
+ {
+ SupportedCipher supportedCipher = ( SupportedCipher ) cipher;
- setEditorDirty();
+ transport.getEnabledCiphers().add( supportedCipher.getCipher() );
+ }
}
}
};
@@ -1351,28 +1326,37 @@ public class LdapLdapsServersPage extend
ciphersLabel.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, glayout.numColumns, 1 ) );
// Ciphers Suites Table Viewer
- ciphersSuiteTableViewer = new TableViewer( composite );
+ ciphersSuiteTableViewer = new CheckboxTableViewer( new Table( composite, SWT.BORDER | SWT.CHECK ) );
ciphersSuiteTableViewer.setContentProvider( new ArrayContentProvider() );
- GridData cipherSuitesTableViewerGridData = new GridData( SWT.FILL, SWT.CENTER, true, false, 3, 4 );
- cipherSuitesTableViewerGridData.heightHint = 60;
- ciphersSuiteTableViewer.getControl().setLayoutData( cipherSuitesTableViewerGridData );
-
- // Add Ciphers Suite Button
- addCiphersSuiteButton = toolkit.createButton( composite,
- Messages.getString( "LdapLdapsServersPage.Add" ), SWT.PUSH ); //$NON-NLS-1$
- addCiphersSuiteButton.setLayoutData( new GridData( SWT.FILL, SWT.BEGINNING, false, false ) );
+ ciphersSuiteTableViewer.setLabelProvider( new LabelProvider()
+ {
+ public String getText( Object cipher )
+ {
+ if ( cipher instanceof SupportedCipher )
+ {
+ SupportedCipher supportedCipher = ( SupportedCipher ) cipher;
- // Edit Ciphers Suite Button
- editCiphersSuiteButton = toolkit.createButton( composite,
- Messages.getString( "LdapLdapsServersPage.Edit" ), SWT.PUSH ); //$NON-NLS-1$
- editCiphersSuiteButton.setLayoutData( new GridData( SWT.FILL, SWT.BEGINNING, false, false ) );
- editCiphersSuiteButton.setEnabled( false );
+ return supportedCipher.getCipher();
+ }
- // Delete Ciphers Suite Button
- deleteCiphersSuiteButton = toolkit.createButton( composite,
- Messages.getString( "LdapLdapsServersPage.Delete" ), SWT.PUSH ); //$NON-NLS-1$
- deleteCiphersSuiteButton.setLayoutData( new GridData( SWT.FILL, SWT.BEGINNING, false, false ) );
- deleteCiphersSuiteButton.setEnabled( false );
+ return super.getText( cipher );
+ }
+ } );
+
+ List<SupportedCipher> supportedCiphers = new ArrayList<SupportedCipher>();
+
+ for ( SupportedCipher supportedCipher : SupportedCipher.SUPPORTED_CIPHERS )
+ {
+ if ( supportedCipher.isJava8Implemented() )
+ {
+ supportedCiphers.add( supportedCipher );
+ }
+ }
+
+ ciphersSuiteTableViewer.setInput( supportedCiphers );
+ GridData ciphersSuiteTableViewerGridData = new GridData( SWT.FILL, SWT.NONE, true, false, glayout.numColumns, 5 );
+ ciphersSuiteTableViewerGridData.heightHint = 60;
+ ciphersSuiteTableViewer.getControl().setLayoutData( ciphersSuiteTableViewerGridData );
// Enabled Protocols label
Label protocolsLabel = toolkit.createLabel( composite, Messages.getString( "LdapLdapsServersPage.EnabledProtocols" ), SWT.WRAP ); //$NON-NLS-1$
@@ -1395,31 +1379,6 @@ public class LdapLdapsServersPage extend
// TLS 1.2
tlsv1_2Checkbox = toolkit.createButton( composite, "TLSv1.2", SWT.CHECK ); //$NON-NLS-1$
tlsv1_2Checkbox.setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, false ) );
-
- /*
- enabledProtocolsTableViewer = new TableViewer( composite );
- enabledProtocolsTableViewer.setContentProvider( new ArrayContentProvider() );
- GridData enabledProtocolsTableViewerGridData = new GridData( SWT.FILL, SWT.CENTER, true, false, 2, 3 );
- enabledProtocolsTableViewerGridData.heightHint = 60;
- enabledProtocolsTableViewer.getControl().setLayoutData( enabledProtocolsTableViewerGridData );
-
- // Add Enabled Protocols Button
- addEnabledProtocolsButton = toolkit.createButton( composite,
- Messages.getString( "LdapLdapsServersPage.Add" ), SWT.PUSH ); //$NON-NLS-1$
- addEnabledProtocolsButton.setLayoutData( new GridData( SWT.FILL, SWT.BEGINNING, false, false ) );
-
- // Edit Enabled Protocols Button
- editEnabledProtocolsButton = toolkit.createButton( composite,
- Messages.getString( "LdapLdapsServersPage.Edit" ), SWT.PUSH ); //$NON-NLS-1$
- editEnabledProtocolsButton.setLayoutData( new GridData( SWT.FILL, SWT.BEGINNING, false, false ) );
- editEnabledProtocolsButton.setEnabled( false );
-
- // Delete Enabled Protocols Button
- deleteEnabledProtocolsButton = toolkit.createButton( composite,
- Messages.getString( "LdapLdapsServersPage.Delete" ), SWT.PUSH ); //$NON-NLS-1$
- deleteEnabledProtocolsButton.setLayoutData( new GridData( SWT.FILL, SWT.BEGINNING, false, false ) );
- deleteEnabledProtocolsButton.setEnabled( false );
- */
}
@@ -1789,13 +1748,7 @@ public class LdapLdapsServersPage extend
addSelectionChangedListener( hashingMethodComboViewer, hashingMethodComboViewerListener );
// Advanced SSL Cipher Suites
- addSelectionChangedListener( ciphersSuiteTableViewer, ciphersSuiteTableViewerSelectionChangedListener );
- addDoubleClickListener( ciphersSuiteTableViewer, ciphersSuiteTableViewerDoubleClickListener );
-
- // Advanced SSL Cipher Suite add/edit/delete buttons listeners
- addSelectionListener( addCiphersSuiteButton, addCiphersSuiteButtonListener );
- addSelectionListener( editCiphersSuiteButton, editCiphersSuiteButtonListener );
- addSelectionListener( deleteCiphersSuiteButton, deleteCiphersSuiteButtonListener );
+ ciphersSuiteTableViewer.addCheckStateListener( ciphersSuiteTableViewerListener );
// Advanced SSL Enabled Protocols
// Enable sslv3 Checkbox
@@ -1968,13 +1921,7 @@ public class LdapLdapsServersPage extend
removeSelectionChangedListener( hashingMethodComboViewer, hashingMethodComboViewerListener );
// Advanced SSL Cipher Suites
- removeSelectionChangedListener( ciphersSuiteTableViewer, ciphersSuiteTableViewerSelectionChangedListener );
- removeDoubleClickListener( ciphersSuiteTableViewer, ciphersSuiteTableViewerDoubleClickListener );
-
- // Advanced SSL Cipher Suite add/edit/delete buttons
- removeSelectionListener( addCiphersSuiteButton, addCiphersSuiteButtonListener );
- removeSelectionListener( editCiphersSuiteButton, editCiphersSuiteButtonListener );
- removeSelectionListener( deleteCiphersSuiteButton, deleteCiphersSuiteButtonListener );
+ ciphersSuiteTableViewer.removeCheckStateListener( ciphersSuiteTableViewerListener );
// Advanced SSL Enabled Protocols SSL v3
removeDirtyListener( sslv3Checkbox );
@@ -2139,9 +2086,33 @@ public class LdapLdapsServersPage extend
}
// SSL/Start TLS Cipher Suites
- ciphersSuiteTableViewer.setInput( ldapServerBean.getEnabledCipherSuites() );
- ciphersSuiteTableViewer.refresh();
+ List<String> enabledCiphers = ldapServerTransportBean.getEnabledCiphers();
+ List<SupportedCipher> supportedCiphers = new ArrayList<SupportedCipher>();
+
+ if ( enabledCiphers == null )
+ {
+ // We don't have any selected ciphers. Propose the full list
+ for ( SupportedCipher cipher : SupportedCipher.supportedCiphersJava8 )
+ {
+ supportedCiphers.add( cipher );
+ }
+ }
+ else
+ {
+ for ( String supportedCipher : enabledCiphers )
+ {
+ SupportedCipher cipher = SupportedCipher.getByName( supportedCipher );
+ if ( cipher != null )
+ {
+ supportedCiphers.add( cipher );
+ }
+ }
+ }
+
+ ciphersSuiteTableViewer.setCheckedElements( supportedCiphers.toArray() );
+ ciphersSuiteTableViewer.refresh();
+
// SSL/Start TLS Enabled Protocols
// Check if we have a LDAP transport
TransportBean transportBean = getLdapTransportBean( TRANSPORT_ID_LDAP );
@@ -2686,6 +2657,8 @@ public class LdapLdapsServersPage extend
return HASHING_PASSWORD_INTERCEPTOR_FQCN_SSHA;
}
}
+
+
/**
@@ -2704,57 +2677,10 @@ public class LdapLdapsServersPage extend
return null;
}
-
-
- /**
- * Gets the selected Ciphers Suite
- *
- * @return the selected Ciphers Suite
- */
- private String getSelectedCiphersSuite()
- {
- StructuredSelection selection = ( StructuredSelection ) ciphersSuiteTableViewer.getSelection();
-
- if ( !selection.isEmpty() )
- {
- return ( String ) selection.getFirstElement();
- }
-
- return null;
- }
-
-
- /**
- * This method is called when the edit cipher suite button is clicked,
- * or when the table viewer is double clicked.
- */
- private void editCiphersSuiteAction()
- {
- String selectedCiphersSuite = getSelectedCiphersSuite();
-
- if ( selectedCiphersSuite != null )
- {
- InputDialog dialog = new InputDialog( editCiphersSuiteButton.getShell(),
- Messages.getString( "LdapLdapsServersPage.Edit" ), //$NON-NLS-1$
- Messages.getString( "LdapLdapsServersPage.CiphersSuite" ), //$NON-NLS-1$
- selectedCiphersSuite, null );
-
- if ( dialog.open() == InputDialog.OK )
- {
- String newCiphersSuite = dialog.getValue();
-
- getLdapServerBean().getEnabledCipherSuites().remove( selectedCiphersSuite );
- getLdapServerBean().addEnabledCipherSuites( newCiphersSuite );
-
- ciphersSuiteTableViewer.refresh();
- ciphersSuiteTableViewer.setSelection( new StructuredSelection( newCiphersSuite ) );
-
- setEditorDirty();
- }
- }
- }
+
+
/**
* Enables/disables SSLV3.
*
Added: directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/SupportedCipher.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/SupportedCipher.java?rev=1653636&view=auto
==============================================================================
--- directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/SupportedCipher.java (added)
+++ directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/SupportedCipher.java Wed Jan 21 19:48:38 2015
@@ -0,0 +1,361 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.directory.studio.apacheds.configuration.v2.editor;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * The supported ciphers, and their status (enabled or not) for each Java version. We use a Boolean
+ * object to store three states :
+ * <ul>
+ * <li>Boolean.TRUE : the cipher is enabled for this java version</li>
+ * <li>Boolean.FALSE : the cipher is disabled for this java version</li>
+ * <li>null : the cipher is not supportted by this java version</li>
+ * </ul>
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public enum SupportedCipher
+{
+ // Enabled ciphers
+ TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384( "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384", Boolean.TRUE, Boolean.TRUE),
+ TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384( "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384", Boolean.TRUE, Boolean.TRUE),
+ TLS_RSA_WITH_AES_256_CBC_SHA256( "TLS_RSA_WITH_AES_256_CBC_SHA256", Boolean.TRUE, Boolean.TRUE),
+ TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384( "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384", Boolean.TRUE, Boolean.TRUE),
+ TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384( "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384", Boolean.TRUE, Boolean.TRUE),
+ TLS_DHE_RSA_WITH_AES_256_CBC_SHA256( "TLS_DHE_RSA_WITH_AES_256_CBC_SHA256", Boolean.TRUE, Boolean.TRUE),
+ TLS_DHE_DSS_WITH_AES_256_CBC_SHA256( "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256", Boolean.TRUE, Boolean.TRUE),
+ TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA( "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA", Boolean.TRUE, Boolean.TRUE),
+ TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA( "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA", Boolean.TRUE, Boolean.TRUE),
+ TLS_RSA_WITH_AES_256_CBC_SHA( "TLS_RSA_WITH_AES_256_CBC_SHA", Boolean.TRUE, Boolean.TRUE),
+ TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA( "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA", Boolean.TRUE, Boolean.TRUE),
+ TLS_ECDH_RSA_WITH_AES_256_CBC_SHA( "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA", Boolean.TRUE, Boolean.TRUE),
+ TLS_DHE_RSA_WITH_AES_256_CBC_SHA( "TLS_DHE_RSA_WITH_AES_256_CBC_SHA", Boolean.TRUE, Boolean.TRUE),
+ TLS_DHE_DSS_WITH_AES_256_CBC_SHA( "TLS_DHE_DSS_WITH_AES_256_CBC_SHA", Boolean.TRUE, Boolean.TRUE),
+ TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256( "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", Boolean.TRUE, Boolean.TRUE),
+ TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256( "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256", Boolean.TRUE, Boolean.TRUE),
+ TLS_RSA_WITH_AES_128_CBC_SHA256( "TLS_RSA_WITH_AES_128_CBC_SHA256", Boolean.TRUE, Boolean.TRUE),
+ TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256( "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256", Boolean.TRUE, Boolean.TRUE),
+ TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256( "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256", Boolean.TRUE, Boolean.TRUE),
+ TLS_DHE_RSA_WITH_AES_128_CBC_SHA256( "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256", Boolean.TRUE, Boolean.TRUE),
+ TLS_DHE_DSS_WITH_AES_128_CBC_SHA256( "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256", Boolean.TRUE, Boolean.TRUE),
+ TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA( "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA", Boolean.TRUE, Boolean.TRUE),
+ TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA( "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", Boolean.TRUE, Boolean.TRUE),
+ TLS_RSA_WITH_AES_128_CBC_SHA( "TLS_RSA_WITH_AES_128_CBC_SHA", Boolean.TRUE, Boolean.TRUE),
+ TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA( "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA", Boolean.TRUE, Boolean.TRUE),
+ TLS_ECDH_RSA_WITH_AES_128_CBC_SHA( "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA", Boolean.TRUE, Boolean.TRUE),
+ TLS_DHE_RSA_WITH_AES_128_CBC_SHA( "TLS_DHE_RSA_WITH_AES_128_CBC_SHA", Boolean.TRUE, Boolean.TRUE),
+ TLS_DHE_DSS_WITH_AES_128_CBC_SHA( "TLS_DHE_DSS_WITH_AES_128_CBC_SHA", Boolean.TRUE, Boolean.TRUE),
+ TLS_ECDHE_ECDSA_WITH_RC4_128_SHA( "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA", Boolean.TRUE, Boolean.TRUE),
+ TLS_ECDHE_RSA_WITH_RC4_128_SHA( "TLS_ECDHE_RSA_WITH_RC4_128_SHA", Boolean.TRUE, Boolean.TRUE),
+ SSL_RSA_WITH_RC4_128_SHA( "SSL_RSA_WITH_RC4_128_SHA", Boolean.TRUE, Boolean.TRUE),
+ TLS_ECDH_ECDSA_WITH_RC4_128_SHA( "TLS_ECDH_ECDSA_WITH_RC4_128_SHA", Boolean.TRUE, Boolean.TRUE),
+ TLS_ECDH_RSA_WITH_RC4_128_SHA( "TLS_ECDH_RSA_WITH_RC4_128_SHA", Boolean.TRUE, Boolean.TRUE),
+ TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384( "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", null, Boolean.TRUE),
+ TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256( "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", null, Boolean.TRUE),
+ TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384( "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", null, Boolean.TRUE),
+ TLS_RSA_WITH_AES_256_GCM_SHA384( "TLS_RSA_WITH_AES_256_GCM_SHA384", null, Boolean.TRUE),
+ TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384( "TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384", null, Boolean.TRUE),
+ TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384( "TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384", null, Boolean.TRUE),
+ TLS_DHE_RSA_WITH_AES_256_GCM_SHA384( "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384", null, Boolean.TRUE),
+ TLS_DHE_DSS_WITH_AES_256_GCM_SHA384( "TLS_DHE_DSS_WITH_AES_256_GCM_SHA384", null, Boolean.TRUE),
+ TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256( "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", null, Boolean.TRUE),
+ TLS_RSA_WITH_AES_128_GCM_SHA256( "TLS_RSA_WITH_AES_128_GCM_SHA256", null, Boolean.TRUE),
+ TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256( "TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256", null, Boolean.TRUE),
+ TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256( "TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256", null, Boolean.TRUE),
+ TLS_DHE_RSA_WITH_AES_128_GCM_SHA256( "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256", null, Boolean.TRUE),
+ TLS_DHE_DSS_WITH_AES_128_GCM_SHA256( "TLS_DHE_DSS_WITH_AES_128_GCM_SHA256", null, Boolean.TRUE),
+ TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA( "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA", Boolean.TRUE, Boolean.TRUE),
+ TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA( "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA", Boolean.TRUE, Boolean.TRUE),
+ SSL_RSA_WITH_3DES_EDE_CBC_SHA( "SSL_RSA_WITH_3DES_EDE_CBC_SHA", Boolean.TRUE, Boolean.TRUE),
+ TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA( "TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA", Boolean.TRUE, Boolean.TRUE),
+ TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA( "TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA", Boolean.TRUE, Boolean.TRUE),
+ SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA( "SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA", Boolean.TRUE, Boolean.TRUE),
+ SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA( "SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA", Boolean.TRUE, Boolean.TRUE),
+ SSL_RSA_WITH_RC4_128_MD5( "SSL_RSA_WITH_RC4_128_MD5", Boolean.TRUE, Boolean.TRUE),
+ TLS_EMPTY_RENEGOTIATION_INFO_SCSV( "TLS_EMPTY_RENEGOTIATION_INFO_SCSV", Boolean.TRUE, Boolean.TRUE),
+
+ // Disabled ciphers
+ TLS_DH_anon_WITH_AES_256_GCM_SHA384( "TLS_DH_anon_WITH_AES_256_GCM_SHA384", null, Boolean.FALSE ),
+ TLS_DH_anon_WITH_AES_128_GCM_SHA256( "TLS_DH_anon_WITH_AES_128_GCM_SHA256", null, Boolean.FALSE ),
+ TLS_DH_anon_WITH_AES_256_CBC_SHA256( "TLS_DH_anon_WITH_AES_256_CBC_SHA256", Boolean.FALSE, Boolean.FALSE ),
+ TLS_ECDH_anon_WITH_AES_256_CBC_SHA( "TLS_ECDH_anon_WITH_AES_256_CBC_SHA", Boolean.FALSE, Boolean.FALSE ),
+ TLS_DH_anon_WITH_AES_256_CBC_SHA( "TLS_DH_anon_WITH_AES_256_CBC_SHA", Boolean.FALSE, Boolean.FALSE ),
+ TLS_DH_anon_WITH_AES_128_CBC_SHA256( "TLS_DH_anon_WITH_AES_128_CBC_SHA256", Boolean.FALSE, Boolean.FALSE ),
+ TLS_ECDH_anon_WITH_AES_128_CBC_SHA( "TLS_ECDH_anon_WITH_AES_128_CBC_SHA", Boolean.FALSE, Boolean.FALSE ),
+ TLS_DH_anon_WITH_AES_128_CBC_SHA( "TLS_DH_anon_WITH_AES_128_CBC_SHA", Boolean.FALSE, Boolean.FALSE ),
+ TLS_ECDH_anon_WITH_RC4_128_SHA( "TLS_ECDH_anon_WITH_RC4_128_SHA", Boolean.FALSE, Boolean.FALSE ),
+ SSL_DH_anon_WITH_RC4_128_MD5( "SSL_DH_anon_WITH_RC4_128_MD5", Boolean.FALSE, Boolean.FALSE ),
+ TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA( "TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA", Boolean.FALSE, Boolean.FALSE ),
+ SSL_DH_anon_WITH_3DES_EDE_CBC_SHA( "SSL_DH_anon_WITH_3DES_EDE_CBC_SHA", Boolean.FALSE, Boolean.FALSE ),
+ TLS_RSA_WITH_NULL_SHA256( "TLS_RSA_WITH_NULL_SHA256", Boolean.FALSE, Boolean.FALSE ),
+ TLS_ECDHE_ECDSA_WITH_NULL_SHA( "TLS_ECDHE_ECDSA_WITH_NULL_SHA", Boolean.FALSE, Boolean.FALSE ),
+ TLS_ECDHE_RSA_WITH_NULL_SHA( "TLS_ECDHE_RSA_WITH_NULL_SHA", Boolean.FALSE, Boolean.FALSE ),
+ SSL_RSA_WITH_NULL_SHA( "SSL_RSA_WITH_NULL_SHA", Boolean.FALSE, Boolean.FALSE ),
+ TLS_ECDH_ECDSA_WITH_NULL_SHA( "TLS_ECDH_ECDSA_WITH_NULL_SHA", Boolean.FALSE, Boolean.FALSE ),
+ TLS_ECDH_RSA_WITH_NULL_SHA( "TLS_ECDH_RSA_WITH_NULL_SHA", Boolean.FALSE, Boolean.FALSE ),
+ TLS_ECDH_anon_WITH_NULL_SHA( "TLS_ECDH_anon_WITH_NULL_SHA", Boolean.FALSE, Boolean.FALSE ),
+ SSL_RSA_WITH_NULL_MD5( "SSL_RSA_WITH_NULL_MD5", Boolean.FALSE, Boolean.FALSE ),
+ SSL_RSA_WITH_DES_CBC_SHA( "SSL_RSA_WITH_DES_CBC_SHA", Boolean.FALSE, Boolean.FALSE ),
+ SSL_DHE_RSA_WITH_DES_CBC_SHA( "SSL_DHE_RSA_WITH_DES_CBC_SHA", Boolean.FALSE, Boolean.FALSE ),
+ SSL_DHE_DSS_WITH_DES_CBC_SHA( "SSL_DHE_DSS_WITH_DES_CBC_SHA", Boolean.FALSE, Boolean.FALSE ),
+ SSL_DH_anon_WITH_DES_CBC_SHA( "SSL_DH_anon_WITH_DES_CBC_SHA", Boolean.FALSE, Boolean.FALSE ),
+ SSL_RSA_EXPORT_WITH_RC4_40_MD5( "SSL_RSA_EXPORT_WITH_RC4_40_MD5", Boolean.FALSE, Boolean.FALSE ),
+ SSL_DH_anon_EXPORT_WITH_RC4_40_MD5( "SSL_DH_anon_EXPORT_WITH_RC4_40_MD5", Boolean.FALSE, Boolean.FALSE ),
+ SSL_RSA_EXPORT_WITH_DES40_CBC_SHA( "SSL_RSA_EXPORT_WITH_DES40_CBC_SHA", Boolean.FALSE, Boolean.FALSE ),
+ SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA( "SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA", Boolean.FALSE, Boolean.FALSE ),
+ SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA( "SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA", Boolean.FALSE, Boolean.FALSE ),
+ SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA( "SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA", Boolean.FALSE, Boolean.FALSE ),
+ TLS_KRB5_WITH_RC4_128_SHA( "TLS_KRB5_WITH_RC4_128_SHA", Boolean.FALSE, Boolean.FALSE ),
+ TLS_KRB5_WITH_RC4_128_MD5( "TLS_KRB5_WITH_RC4_128_MD5", Boolean.FALSE, Boolean.FALSE ),
+ TLS_KRB5_WITH_3DES_EDE_CBC_SHA( "TLS_KRB5_WITH_3DES_EDE_CBC_SHA", Boolean.FALSE, Boolean.FALSE ),
+ TLS_KRB5_WITH_3DES_EDE_CBC_MD5( "TLS_KRB5_WITH_3DES_EDE_CBC_MD5", Boolean.FALSE, Boolean.FALSE ),
+ TLS_KRB5_WITH_DES_CBC_SHA( "TLS_KRB5_WITH_DES_CBC_SHA", Boolean.FALSE, Boolean.FALSE ),
+ TLS_KRB5_WITH_DES_CBC_MD5( "TLS_KRB5_WITH_DES_CBC_MD5", Boolean.FALSE, Boolean.FALSE ),
+ TLS_KRB5_EXPORT_WITH_RC4_40_SHA( "TLS_KRB5_EXPORT_WITH_RC4_40_SHA", Boolean.FALSE, Boolean.FALSE ),
+ TLS_KRB5_EXPORT_WITH_RC4_40_MD5( "TLS_KRB5_EXPORT_WITH_RC4_40_MD5", Boolean.FALSE, Boolean.FALSE ),
+ TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA( "TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA", Boolean.FALSE, Boolean.FALSE ),
+ TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5( "TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5", Boolean.FALSE, Boolean.FALSE );
+
+ /**
+ * The list of supported ciphers for JAVA 8
+ */
+ public static final SupportedCipher[] SUPPORTED_CIPHERS =
+ {
+ TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
+ TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,
+ TLS_RSA_WITH_AES_256_CBC_SHA256,
+ TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384,
+ TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384,
+ TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,
+ TLS_DHE_DSS_WITH_AES_256_CBC_SHA256,
+ TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
+ TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
+ TLS_RSA_WITH_AES_256_CBC_SHA,
+ TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA,
+ TLS_ECDH_RSA_WITH_AES_256_CBC_SHA,
+ TLS_DHE_RSA_WITH_AES_256_CBC_SHA,
+ TLS_DHE_DSS_WITH_AES_256_CBC_SHA,
+ TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
+ TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
+ TLS_RSA_WITH_AES_128_CBC_SHA256,
+ TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256,
+ TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256,
+ TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,
+ TLS_DHE_DSS_WITH_AES_128_CBC_SHA256,
+ TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
+ TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
+ TLS_RSA_WITH_AES_128_CBC_SHA,
+ TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA,
+ TLS_ECDH_RSA_WITH_AES_128_CBC_SHA,
+ TLS_DHE_RSA_WITH_AES_128_CBC_SHA,
+ TLS_DHE_DSS_WITH_AES_128_CBC_SHA,
+ TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,
+ TLS_ECDHE_RSA_WITH_RC4_128_SHA,
+ SSL_RSA_WITH_RC4_128_SHA,
+ TLS_ECDH_ECDSA_WITH_RC4_128_SHA,
+ TLS_ECDH_RSA_WITH_RC4_128_SHA,
+ TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
+ TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
+ TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
+ TLS_RSA_WITH_AES_256_GCM_SHA384,
+ TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384,
+ TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384,
+ TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,
+ TLS_DHE_DSS_WITH_AES_256_GCM_SHA384,
+ TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
+ TLS_RSA_WITH_AES_128_GCM_SHA256,
+ TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256,
+ TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256,
+ TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,
+ TLS_DHE_DSS_WITH_AES_128_GCM_SHA256,
+ TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA,
+ TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,
+ SSL_RSA_WITH_3DES_EDE_CBC_SHA,
+ TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA,
+ TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA,
+ SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA,
+ SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA,
+ SSL_RSA_WITH_RC4_128_MD5,
+ TLS_EMPTY_RENEGOTIATION_INFO_SCSV,
+ TLS_DH_anon_WITH_AES_256_GCM_SHA384,
+ TLS_DH_anon_WITH_AES_128_GCM_SHA256,
+ TLS_DH_anon_WITH_AES_256_CBC_SHA256,
+ TLS_ECDH_anon_WITH_AES_256_CBC_SHA,
+ TLS_DH_anon_WITH_AES_256_CBC_SHA,
+ TLS_DH_anon_WITH_AES_128_CBC_SHA256,
+ TLS_ECDH_anon_WITH_AES_128_CBC_SHA,
+ TLS_DH_anon_WITH_AES_128_CBC_SHA,
+ TLS_ECDH_anon_WITH_RC4_128_SHA,
+ SSL_DH_anon_WITH_RC4_128_MD5,
+ TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA,
+ SSL_DH_anon_WITH_3DES_EDE_CBC_SHA,
+ TLS_RSA_WITH_NULL_SHA256,
+ TLS_ECDHE_ECDSA_WITH_NULL_SHA,
+ TLS_ECDHE_RSA_WITH_NULL_SHA,
+ SSL_RSA_WITH_NULL_SHA,
+ TLS_ECDH_ECDSA_WITH_NULL_SHA,
+ TLS_ECDH_RSA_WITH_NULL_SHA,
+ TLS_ECDH_anon_WITH_NULL_SHA,
+ SSL_RSA_WITH_NULL_MD5,
+ SSL_RSA_WITH_DES_CBC_SHA,
+ SSL_DHE_RSA_WITH_DES_CBC_SHA,
+ SSL_DHE_DSS_WITH_DES_CBC_SHA,
+ SSL_DH_anon_WITH_DES_CBC_SHA,
+ SSL_RSA_EXPORT_WITH_RC4_40_MD5,
+ SSL_DH_anon_EXPORT_WITH_RC4_40_MD5,
+ SSL_RSA_EXPORT_WITH_DES40_CBC_SHA,
+ SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA,
+ SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA,
+ SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA,
+ TLS_KRB5_WITH_RC4_128_SHA,
+ TLS_KRB5_WITH_RC4_128_MD5,
+ TLS_KRB5_WITH_3DES_EDE_CBC_SHA,
+ TLS_KRB5_WITH_3DES_EDE_CBC_MD5,
+ TLS_KRB5_WITH_DES_CBC_SHA,
+ TLS_KRB5_WITH_DES_CBC_MD5,
+ TLS_KRB5_EXPORT_WITH_RC4_40_SHA,
+ TLS_KRB5_EXPORT_WITH_RC4_40_MD5,
+ TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA,
+ TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5
+ };
+
+
+ /** The supported cipher name */
+ private String cipher;
+
+ /** A flag that tells if the cipher is supported in Java 7 */
+ private Boolean java7;
+
+ /** A flag that tells if the cipher is supported in Java 8 */
+ private Boolean java8;
+
+ /** A map containing all the values */
+ private static Map<String, SupportedCipher> supportedCiphersByName = new HashMap<String, SupportedCipher>();
+
+ /** A list of all the supported ciphers for JAVA 7 */
+ public static List<SupportedCipher> supportedCiphersJava7 = new ArrayList<SupportedCipher>();
+
+ /** A list of all the supported cipher names for JAVA 7 */
+ public static List<String> supportedCipherNamesJava7 = new ArrayList<String>();
+
+ /** A list of all the supported ciphers for JAVA 8 */
+ public static List<SupportedCipher> supportedCiphersJava8 = new ArrayList<SupportedCipher>();
+
+ /** A list of all the supported cipher names for JAVA 8 */
+ public static List<String> supportedCipherNamesJava8 = new ArrayList<String>();
+
+ /** Initialization of the previous maps and lists */
+ static
+ {
+ for ( SupportedCipher cipher : SupportedCipher.values() )
+ {
+ supportedCiphersByName.put( cipher.getCipher(), cipher );
+
+ if ( cipher.isJava7Implemented() )
+ {
+ supportedCiphersJava7.add( cipher );
+ supportedCipherNamesJava7.add( cipher.cipher );
+ }
+
+ if ( cipher.isJava8Implemented() )
+ {
+ supportedCiphersJava8.add( cipher );
+ supportedCipherNamesJava8.add( cipher.cipher );
+ }
+ }
+ }
+
+ /**
+ * A private constructor used to initialize the enum values
+ */
+ private SupportedCipher( String cipher, Boolean java7, Boolean java8 )
+ {
+ this.cipher = cipher;
+ this.java7 = java7;
+ this.java8 = java8;
+ }
+
+
+ /**
+ * @return the cipher
+ */
+ public String getCipher()
+ {
+ return cipher;
+ }
+
+
+ /**
+ * @return <code>true</code> if the cipher is enabled on Java 7, <code>false</code> if
+ * the cipher is disabled in Java 7, or not implemented.
+ */
+ public Boolean isJava7Enabled()
+ {
+ return java7 != null && java7;
+ }
+
+
+ /**
+ * @return <code>true</code> if the cipher is implemented in Java 7, regardless of it's enabled or disabled
+ */
+ public boolean isJava7Implemented()
+ {
+ return java7 != null;
+ }
+
+
+ /**
+ * @return <code>true</code> if the cipher is enabled on Java 8, <code>false</code> if
+ * the cipher is disabled in Java 8, or not implemented.
+ */
+ public boolean isJava8Enabled()
+ {
+ return java8!= null && java8;
+ }
+
+
+ /**
+ * @return <code>true</code> if the cipher is implemented in Java 8, regardless of it's enabled or disabled
+ */
+ public boolean isJava8Implemented()
+ {
+ return java8 != null;
+ }
+
+
+ /**
+ * Get the SupportedCipher given a String.
+ * @param type The supported cipher string we want to find
+ * @return The found SupportedCipher, or null
+ */
+ public static SupportedCipher getByName( String type )
+ {
+ if ( type == null )
+ {
+ return null;
+ }
+
+ return supportedCiphersByName.get( type.toUpperCase() );
+ }
+}
Modified: directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages.properties
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages.properties?rev=1653636&r1=1653635&r2=1653636&view=diff
==============================================================================
--- directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages.properties (original)
+++ directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages.properties Wed Jan 21 19:48:38 2015
@@ -47,6 +47,7 @@ KerberosServerPage.VerifyBodyChecksum=Ve
LdapLdapsServersPage.Add=Add...
LdapLdapsServersPage.Address=Address:
LdapLdapsServersPage.Advanced=Advanced
+LdapLdapsServersPage.AtLeastOneCipherMustBeSelected=At least one Cipher must be selected.
LdapLdapsServersPage.BackLogSize=BackLog Size:
LdapLdapsServersPage.Browse=Browse...
LdapLdapsServersPage.CiphersSuite=Ciphers Suite:
Modified: directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages_de.properties
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages_de.properties?rev=1653636&r1=1653635&r2=1653636&view=diff
==============================================================================
--- directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages_de.properties (original)
+++ directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages_de.properties Wed Jan 21 19:48:38 2015
@@ -47,6 +47,7 @@ KerberosServerPage.VerifyBodyChecksum=Ti
LdapLdapsServersPage.Add=Hinzuf\u00FCgen...
LdapLdapsServersPage.Address=Adressen:
LdapLdapsServersPage.Advanced=Erweitert
+LdapLdapsServersPage.AtLeastOneCipherMustBeSelected=Bitte zumindest ein Cipher ausw\u00E4hlen.
LdapLdapsServersPage.BackLogSize=BackLog Gr\u00F6\u00DFe:
LdapLdapsServersPage.Browse=Browsen...
LdapLdapsServersPage.CiphersSuite=(EN)Ciphers Suite:
Modified: directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages_fr.properties
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages_fr.properties?rev=1653636&r1=1653635&r2=1653636&view=diff
==============================================================================
--- directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages_fr.properties (original)
+++ directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/messages_fr.properties Wed Jan 21 19:48:38 2015
@@ -47,6 +47,7 @@ KerberosServerPage.VerifyBodyChecksum=V�
LdapLdapsServersPage.Add=Ajouter...
LdapLdapsServersPage.Address=Adresse:
LdapLdapsServersPage.Advanced=Avancé
+LdapLdapsServersPage.AtLeastOneCipherMustBeSelected=Au moins un Cipher doit être sélectionné.
LdapLdapsServersPage.BackLogSize=Taille BackLog:
LdapLdapsServersPage.Browse=Parcourir...
LdapLdapsServersPage.CiphersSuite=Ciphers authorisés: