You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by se...@apache.org on 2009/05/21 19:50:16 UTC
svn commit: r777201 - in /directory/studio/trunk:
connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/
connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/
jars/
Author: seelmann
Date: Thu May 21 17:50:11 2009
New Revision: 777201
URL: http://svn.apache.org/viewvc?rev=777201&view=rev
Log:
DIRSTUDIO-263 (Add certificate validation for ldaps and StartTLS): Added dialog to examine certificate
Added:
directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/CertificateInfoDialog.java (with props)
directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/CertificateInfoComposite.java (with props)
Modified:
directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/CertificateTrustDialog.java
directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/messages.properties
directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/messages_de.properties
directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/messages_fr.properties
directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/messages.properties
directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/messages_de.properties
directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/messages_fr.properties
directory/studio/trunk/jars/pom.xml
Added: directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/CertificateInfoDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/CertificateInfoDialog.java?rev=777201&view=auto
==============================================================================
--- directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/CertificateInfoDialog.java (added)
+++ directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/CertificateInfoDialog.java Thu May 21 17:50:11 2009
@@ -0,0 +1,97 @@
+/*
+ * 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.connection.ui.dialogs;
+
+
+import java.security.cert.X509Certificate;
+
+import org.apache.directory.studio.connection.ui.widgets.CertificateInfoComposite;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+
+
+/**
+ * Dialog to show dialog information.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class CertificateInfoDialog extends Dialog
+{
+
+ /** The title. */
+ private String title;
+
+ /** The certificate chain. */
+ private X509Certificate[] certificateChain;
+
+
+ /**
+ * Creates a new instance of CertificateInfoDialog.
+ *
+ * @param parentShell the parent shell
+ * @param certificateChain the certificate chain
+ */
+ public CertificateInfoDialog( Shell parentShell, X509Certificate[] certificateChain )
+ {
+ super( parentShell );
+ super.setShellStyle( super.getShellStyle() | SWT.RESIZE );
+ this.title = Messages.getString( "CertificateInfoDialog.CertificateViewer" ); //$NON-NLS-1$
+ this.certificateChain = certificateChain;
+ }
+
+
+ @Override
+ protected void configureShell( Shell shell )
+ {
+ super.configureShell( shell );
+ shell.setText( title );
+ }
+
+
+ @Override
+ protected void createButtonsForButtonBar( Composite parent )
+ {
+ createButton( parent, IDialogConstants.CANCEL_ID, IDialogConstants.CLOSE_LABEL, false );
+ }
+
+
+ @Override
+ protected Control createDialogArea( final Composite parent )
+ {
+ Composite composite = ( Composite ) super.createDialogArea( parent );
+ GridData gd = new GridData( GridData.FILL_BOTH );
+ gd.widthHint = convertHorizontalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH * 3 / 2 );
+ gd.heightHint = convertVerticalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH );
+ composite.setLayoutData( gd );
+
+ CertificateInfoComposite certificateInfoComposite = new CertificateInfoComposite( composite, SWT.NONE );
+ certificateInfoComposite.setInput( certificateChain );
+
+ applyDialogFont( composite );
+ return composite;
+ }
+
+}
Propchange: directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/CertificateInfoDialog.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/CertificateTrustDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/CertificateTrustDialog.java?rev=777201&r1=777200&r2=777201&view=diff
==============================================================================
--- directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/CertificateTrustDialog.java (original)
+++ directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/CertificateTrustDialog.java Thu May 21 17:50:11 2009
@@ -122,15 +122,33 @@
BaseWidgetUtils.createWrappedLabel( composite, Messages.getString( "CertificateTrustDialog.Description" ), 1 ); //$NON-NLS-1$
BaseWidgetUtils.createWrappedLabel( composite, Messages.getString( "CertificateTrustDialog.TheDnIs" ), 1 ); //$NON-NLS-1$
- Label issuerDNLabel = BaseWidgetUtils.createWrappedLabel( composite, "", 1 ); //$NON-NLS-1$
+ Composite innerComposite = BaseWidgetUtils.createColumnContainer( composite, 2, 1 );
+ Label issuerDNLabel = BaseWidgetUtils.createWrappedLabel( innerComposite, "", 1 ); //$NON-NLS-1$
if ( ( certificateChain != null ) && ( certificateChain.length > 0 ) )
{
issuerDNLabel.setText( certificateChain[0].getIssuerX500Principal().getName() );
}
else
{
- issuerDNLabel.setText( "Unknown" ); //$NON-NLS-1$
+ issuerDNLabel.setText( " - " ); //$NON-NLS-1$
}
+ Button showCertificateDetailsButton = BaseWidgetUtils.createButton( innerComposite, Messages
+ .getString( "CertificateTrustDialog.ViewCertificate" ), 1 );//$NON-NLS-1$
+ showCertificateDetailsButton.addSelectionListener( new SelectionAdapter()
+ {
+ @Override
+ public void widgetSelected( SelectionEvent e )
+ {
+ new CertificateInfoDialog( getShell(), certificateChain ).open();
+ }
+
+
+ @Override
+ public void widgetDefaultSelected( SelectionEvent e )
+ {
+ new CertificateInfoDialog( getShell(), certificateChain ).open();
+ }
+ } );
trustNotButton = BaseWidgetUtils.createRadiobutton( composite, Messages
.getString( "CertificateTrustDialog.DoNotTrust" ), 1 ); //$NON-NLS-1$
Modified: directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/messages.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/messages.properties?rev=777201&r1=777200&r2=777201&view=diff
==============================================================================
--- directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/messages.properties (original)
+++ directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/messages.properties Thu May 21 17:50:11 2009
@@ -17,9 +17,11 @@
SelectReferralConnectionDialog.SelectConnectionToHandleReferral=Please select a connection to handle referral
SelectReferralConnectionDialog.SelectReferralConenction=Select Referral Connection
+CertificateInfoDialog.CertificateViewer=Certificate Viewer
CertificateTrustDialog.AlwaysTrust=Always trust this certificate.
CertificateTrustDialog.CertificateTrust=Certificate Trust
CertificateTrustDialog.Description=A secured LDAP connection requires to trust a certificate. The certificate is issued by an unknown Certificate Authority (CA). Please verify if you trust the certificate.
CertificateTrustDialog.DoNotTrust=Don't trust this certificate.
CertificateTrustDialog.TheDnIs=The issuer of the certificate is:
CertificateTrustDialog.TrustForThisSession=Trust this certificate for this session.
+CertificateTrustDialog.ViewCertificate=View...
Modified: directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/messages_de.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/messages_de.properties?rev=777201&r1=777200&r2=777201&view=diff
==============================================================================
--- directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/messages_de.properties (original)
+++ directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/messages_de.properties Thu May 21 17:50:11 2009
@@ -17,9 +17,11 @@
SelectReferralConnectionDialog.SelectConnectionToHandleReferral=Bitte w\u00E4hlen Sie den Verweis verwaltende Verbindung aus
SelectReferralConnectionDialog.SelectReferralConenction=W\u00E4hlen Sie die verweisende Verbindung aus
+CertificateInfoDialog.CertificateViewer=Zertifikat Ansicht
CertificateTrustDialog.AlwaysTrust=Diesem Zertifikat immer vertrauten.
CertificateTrustDialog.CertificateTrust=Ung\u00FCltiges Zertifikat
CertificateTrustDialog.Description=Eine sichere LDAP Verbindung erfordert ein gültiges Zertifikat. Das Zertifikat wurde durch eine unbekannten Stelle (CA) ausgestellt. Bitte bestätigen Sie, ob Sie dem Zertifikat vertrauen wollen.
-CertificateTrustDialog.DoNotTrust=Diesem Zertifikat nicht vertrauten.
+CertificateTrustDialog.DoNotTrust=Diesem Zertifikat nicht vertrauen.
CertificateTrustDialog.TheDnIs=Der Aussteller des Zertifikates ist:
-CertificateTrustDialog.TrustForThisSession=Diesem Zertifikat für diese Sitzung vertrauen.
\ No newline at end of file
+CertificateTrustDialog.TrustForThisSession=Diesem Zertifikat für diese Sitzung vertrauen.
+CertificateTrustDialog.ViewCertificate=Anzeigen...
\ No newline at end of file
Modified: directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/messages_fr.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/messages_fr.properties?rev=777201&r1=777200&r2=777201&view=diff
==============================================================================
--- directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/messages_fr.properties (original)
+++ directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/messages_fr.properties Thu May 21 17:50:11 2009
@@ -17,9 +17,11 @@
SelectReferralConnectionDialog.SelectConnectionToHandleReferral=Veuillez s\u00E9lectionner une connexion vers un referral
SelectReferralConnectionDialog.SelectReferralConenction=S\u00E9lectionnez la connexion vers le referral de votre choix
+CertificateInfoDialog.CertificateViewer=TODO:Certificate Viewer
CertificateTrustDialog.AlwaysTrust=TODO:Always trust this certificate.
CertificateTrustDialog.CertificateTrust=TODO:Certificate Trust
CertificateTrustDialog.Description=TODO:A secured LDAP connection requires to trust a certificate. The certificate is issued by an unknown Certificate Authority (CA). Please verify if you trust the certificate.
CertificateTrustDialog.DoNotTrust=TODO:Don't trust this certificate.
CertificateTrustDialog.TheDnIs=TODO:The issuer of the certificate is:
CertificateTrustDialog.TrustForThisSession=TODO:Trust this certificate for this session.
+CertificateTrustDialog.ViewCertificate=TODO:View...
Added: directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/CertificateInfoComposite.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/CertificateInfoComposite.java?rev=777201&view=auto
==============================================================================
--- directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/CertificateInfoComposite.java (added)
+++ directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/CertificateInfoComposite.java Thu May 21 17:50:11 2009
@@ -0,0 +1,622 @@
+/*
+ * 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.connection.ui.widgets;
+
+
+import java.io.IOException;
+import java.security.cert.CertificateEncodingException;
+import java.security.cert.X509Certificate;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.naming.NamingException;
+import javax.naming.ldap.LdapName;
+import javax.naming.ldap.Rdn;
+import javax.security.auth.x500.X500Principal;
+
+import org.apache.commons.codec.binary.Hex;
+import org.apache.commons.codec.digest.DigestUtils;
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang.time.DateFormatUtils;
+import org.bouncycastle.asn1.ASN1Object;
+import org.bouncycastle.x509.extension.X509ExtensionUtil;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.TabFolder;
+import org.eclipse.swt.widgets.TabItem;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+
+
+/**
+ * This composite contains the tabs with general and detail of an certificate.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class CertificateInfoComposite extends Composite
+{
+
+ /** The default attributes of an X500Principal: CN, L, ST, O, OU, C, STREET, DC, UID */
+ String[] ATTRIBUTES =
+ { "CN", //$NON-NLS-1$
+ "L", //$NON-NLS-1$
+ "ST", //$NON-NLS-1$
+ "O", //$NON-NLS-1$
+ "OU", //$NON-NLS-1$
+ "C", //$NON-NLS-1$
+ "STREET", //$NON-NLS-1$
+ "DC", //$NON-NLS-1$
+ "UID" //$NON-NLS-1$
+ };
+
+ /** The index of the general tab */
+ public static final int GENERAL_TAB_INDEX = 0;
+
+ /** The index of the details tab */
+ public static final int DETAILS_TAB_INDEX = 1;
+
+ /** The tab folder */
+ private TabFolder tabFolder;
+
+ /** The general tab */
+ private TabItem generalTab;
+
+ private Text issuedToCN;
+ private Text issuedToO;
+ private Text issuedToOU;
+ private Text serialNumber;
+ private Text issuedByCN;
+ private Text issuedByO;
+ private Text issuedByOU;
+ private Text issuesOn;
+ private Text expiresOn;
+ private Text fingerprintSHA1;
+ private Text fingerprintMD5;
+
+ /** The details tab */
+ private TabItem detailsTab;
+
+ private TreeViewer hierarchyTreeViewer;
+ private Tree certificateTree;
+ private Text valueText;
+
+
+ /**
+ * Creates a new instance of CertificateInfoComposite.
+ *
+ * @param parent
+ * @param style
+ */
+ public CertificateInfoComposite( Composite parent, int style )
+ {
+ super( parent, style );
+ setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true ) );
+ GridLayout layout = new GridLayout( 1, false );
+ layout.marginWidth = 0;
+ layout.marginHeight = 0;
+ setLayout( layout );
+
+ createTabFolder();
+ createGeneralTab();
+ createDetailsTab();
+ }
+
+
+ /**
+ * Creates the tab folder.
+ */
+ private void createTabFolder()
+ {
+ tabFolder = new TabFolder( this, SWT.TOP );
+ GridLayout mainLayout = new GridLayout();
+ mainLayout.marginWidth = 0;
+ mainLayout.marginHeight = 0;
+ tabFolder.setLayout( mainLayout );
+ tabFolder.setLayoutData( new GridData( GridData.FILL, GridData.FILL, true, true ) );
+ }
+
+
+ /**
+ * Creates the general tab.
+ */
+ private void createGeneralTab()
+ {
+ // create inner container
+ Composite generalContainer = new Composite( tabFolder, SWT.NONE );
+ GridLayout currentLayout = new GridLayout( 1, false );
+ generalContainer.setLayout( currentLayout );
+ generalContainer.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
+
+ // issues to section
+ Group issuedToGroup = BaseWidgetUtils.createGroup( generalContainer, Messages
+ .getString( "CertificateInfoComposite.IssuedToLabel" ), 1 ); //$NON-NLS-1$
+ issuedToGroup.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
+ Composite issuedToComposite = BaseWidgetUtils.createColumnContainer( issuedToGroup, 2, 1 );
+ BaseWidgetUtils.createLabel( issuedToComposite,
+ Messages.getString( "CertificateInfoComposite.CommonNameLabel" ), 1 ); //$NON-NLS-1$
+ issuedToCN = BaseWidgetUtils.createLabeledText( issuedToComposite, StringUtils.EMPTY, 1 );
+ BaseWidgetUtils.createLabel( issuedToComposite, Messages
+ .getString( "CertificateInfoComposite.OrganizationLabel" ), 1 ); //$NON-NLS-1$
+ issuedToO = BaseWidgetUtils.createLabeledText( issuedToComposite, StringUtils.EMPTY, 1 );
+ BaseWidgetUtils.createLabel( issuedToComposite, Messages
+ .getString( "CertificateInfoComposite.OrganizationalUnitLabel" ), 1 ); //$NON-NLS-1$
+ issuedToOU = BaseWidgetUtils.createLabeledText( issuedToComposite, StringUtils.EMPTY, 1 );
+ BaseWidgetUtils.createLabel( issuedToComposite, Messages
+ .getString( "CertificateInfoComposite.SerialNumberLabel" ), 1 ); //$NON-NLS-1$
+ serialNumber = BaseWidgetUtils.createLabeledText( issuedToComposite, StringUtils.EMPTY, 1 );
+
+ // issuer section
+ Group issuedFromGroup = BaseWidgetUtils.createGroup( generalContainer, Messages
+ .getString( "CertificateInfoComposite.IssuedByLabel" ), 1 ); //$NON-NLS-1$
+ issuedFromGroup.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
+ Composite issuedFromComposite = BaseWidgetUtils.createColumnContainer( issuedFromGroup, 2, 1 );
+ BaseWidgetUtils.createLabel( issuedFromComposite, Messages
+ .getString( "CertificateInfoComposite.CommonNameLabel" ), 1 ); //$NON-NLS-1$
+ issuedByCN = BaseWidgetUtils.createLabeledText( issuedFromComposite, StringUtils.EMPTY, 1 );
+ BaseWidgetUtils.createLabel( issuedFromComposite, Messages
+ .getString( "CertificateInfoComposite.OrganizationLabel" ), 1 ); //$NON-NLS-1$
+ issuedByO = BaseWidgetUtils.createLabeledText( issuedFromComposite, StringUtils.EMPTY, 1 );
+ BaseWidgetUtils.createLabel( issuedFromComposite, Messages
+ .getString( "CertificateInfoComposite.OrganizationalUnitLabel" ), 1 ); //$NON-NLS-1$
+ issuedByOU = BaseWidgetUtils.createLabeledText( issuedFromComposite, StringUtils.EMPTY, 1 );
+
+ // validity section
+ Group validityGroup = BaseWidgetUtils.createGroup( generalContainer, Messages
+ .getString( "CertificateInfoComposite.ValidityLabel" ), 1 ); //$NON-NLS-1$
+ validityGroup.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
+ Composite generalComposite = BaseWidgetUtils.createColumnContainer( validityGroup, 2, 1 );
+ BaseWidgetUtils.createLabel( generalComposite,
+ Messages.getString( "CertificateInfoComposite.IssuedOnLabel" ), 1 ); //$NON-NLS-1$
+ issuesOn = BaseWidgetUtils.createLabeledText( generalComposite, StringUtils.EMPTY, 1 );
+ BaseWidgetUtils.createLabel( generalComposite,
+ Messages.getString( "CertificateInfoComposite.ExpiresOnLabel" ), 1 ); //$NON-NLS-1$
+ expiresOn = BaseWidgetUtils.createLabeledText( generalComposite, StringUtils.EMPTY, 1 );
+
+ // fingerprint section
+ Group fingerprintsGroup = BaseWidgetUtils.createGroup( generalContainer, Messages
+ .getString( "CertificateInfoComposite.FingerprintsLabel" ), 1 ); //$NON-NLS-1$
+ fingerprintsGroup.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
+ Composite fingerprintsComposite = BaseWidgetUtils.createColumnContainer( fingerprintsGroup, 2, 1 );
+ BaseWidgetUtils.createLabel( fingerprintsComposite, Messages
+ .getString( "CertificateInfoComposite.SHA1FingerprintLabel" ), 1 ); //$NON-NLS-1$
+ fingerprintSHA1 = BaseWidgetUtils.createLabeledText( fingerprintsComposite, StringUtils.EMPTY, 1 );
+ BaseWidgetUtils.createLabel( fingerprintsComposite, Messages
+ .getString( "CertificateInfoComposite.MD5FingerprintLabel" ), 1 ); //$NON-NLS-1$
+ fingerprintMD5 = BaseWidgetUtils.createLabeledText( fingerprintsComposite, StringUtils.EMPTY, 1 );
+
+ // create tab
+ generalTab = new TabItem( tabFolder, SWT.NONE, GENERAL_TAB_INDEX );
+ generalTab.setText( Messages.getString( "CertificateInfoComposite.General" ) ); //$NON-NLS-1$
+ generalTab.setControl( generalContainer );
+ }
+
+
+ /**
+ * Creates the details tab.
+ */
+ private void createDetailsTab()
+ {
+ SashForm detailsForm = new SashForm( tabFolder, SWT.VERTICAL );
+ detailsForm.setLayout( new FillLayout() );
+
+ Composite hierarchyContainer = new Composite( detailsForm, SWT.NONE );
+ hierarchyContainer.setLayout( new GridLayout( 1, false ) );
+ BaseWidgetUtils.createLabel( hierarchyContainer, Messages
+ .getString( "CertificateInfoComposite.CertificateHierarchyLabel" ), 1 ); //$NON-NLS-1$
+ hierarchyTreeViewer = new TreeViewer( hierarchyContainer );
+ hierarchyTreeViewer.getTree().setLayoutData( new GridData( GridData.FILL, GridData.FILL, true, true ) );
+ hierarchyTreeViewer.setContentProvider( new HierarchyContentProvider() );
+ hierarchyTreeViewer.setLabelProvider( new HierarchyLabelProvider() );
+ hierarchyTreeViewer.addSelectionChangedListener( new ISelectionChangedListener()
+ {
+ public void selectionChanged( SelectionChangedEvent event )
+ {
+ event.getSelection();
+ populateCertificateTree();
+ }
+ } );
+
+ Composite certificateContainer = new Composite( detailsForm, SWT.NONE );
+ certificateContainer.setLayout( new GridLayout( 1, false ) );
+ BaseWidgetUtils.createLabel( certificateContainer, Messages
+ .getString( "CertificateInfoComposite.CertificateFieldsLabel" ), 1 ); //$NON-NLS-1$
+ certificateTree = new Tree( certificateContainer, SWT.BORDER );
+ certificateTree.setLayoutData( new GridData( GridData.FILL, GridData.FILL, true, true ) );
+ certificateTree.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( final SelectionEvent e )
+ {
+ TreeItem item = ( TreeItem ) e.item;
+ if ( ( item != null ) && ( item.getData() != null ) )
+ {
+ valueText.setText( item.getData().toString() );
+ }
+ else
+ {
+ valueText.setText( StringUtils.EMPTY );
+ }
+ }
+ } );
+
+ Composite valueContainer = new Composite( detailsForm, SWT.NONE );
+ valueContainer.setLayout( new GridLayout( 1, false ) );
+ BaseWidgetUtils.createLabel( valueContainer,
+ Messages.getString( "CertificateInfoComposite.FieldValuesLabel" ), 1 ); //$NON-NLS-1$
+ valueText = new Text( valueContainer, SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.READ_ONLY );
+ valueText.setLayoutData( new GridData( GridData.FILL, GridData.FILL, true, true ) );
+ valueText.setFont( JFaceResources.getFont( JFaceResources.TEXT_FONT ) );
+ valueText.setBackground( detailsForm.getBackground() );
+
+ // create tab
+ detailsForm.setWeights( new int[]
+ { 1, 2, 1 } );
+ detailsTab = new TabItem( tabFolder, SWT.NONE, DETAILS_TAB_INDEX );
+ detailsTab.setText( Messages.getString( "CertificateInfoComposite.Details" ) ); //$NON-NLS-1$
+ detailsTab.setControl( detailsForm );
+ }
+
+
+ /**
+ * Sets the input for this composite.
+ *
+ * @param certificateChain certificate chain input
+ */
+ public void setInput( X509Certificate[] certificateChain )
+ {
+ X509Certificate certificate = certificateChain[0];
+
+ X500Principal issuedToPrincipal = certificate.getSubjectX500Principal();
+ Map<String, String> issuedToAttributes = getAttributeMap( issuedToPrincipal );
+ issuedToCN.setText( issuedToAttributes.get( "CN" ) ); //$NON-NLS-1$
+ issuedToO.setText( issuedToAttributes.get( "O" ) ); //$NON-NLS-1$
+ issuedToOU.setText( issuedToAttributes.get( "OU" ) ); //$NON-NLS-1$
+ serialNumber.setText( certificate.getSerialNumber().toString( 16 ) );
+
+ X500Principal issuedFromPrincipal = certificate.getIssuerX500Principal();
+ Map<String, String> issuedFromAttributes = getAttributeMap( issuedFromPrincipal );
+ issuedByCN.setText( issuedFromAttributes.get( "CN" ) ); //$NON-NLS-1$
+ issuedByO.setText( issuedFromAttributes.get( "O" ) ); //$NON-NLS-1$
+ issuedByOU.setText( issuedFromAttributes.get( "OU" ) ); //$NON-NLS-1$
+
+ issuesOn.setText( DateFormatUtils.ISO_DATE_FORMAT.format( certificate.getNotBefore() ) );
+ expiresOn.setText( DateFormatUtils.ISO_DATE_FORMAT.format( certificate.getNotAfter() ) );
+
+ byte[] encoded2 = null;
+ try
+ {
+ encoded2 = certificate.getEncoded();
+ }
+ catch ( CertificateEncodingException e )
+ {
+ }
+ byte[] md5 = DigestUtils.md5( encoded2 );
+ String md5HexString = getHexString( md5 );
+ fingerprintMD5.setText( md5HexString );
+ byte[] sha = DigestUtils.sha( encoded2 );
+ String shaHexString = getHexString( sha );
+ fingerprintSHA1.setText( shaHexString );
+
+ // Details: certificate chain
+ CertificateChainItem parentItem = null;
+ CertificateChainItem certificateItem = null;
+ for ( X509Certificate cert : certificateChain )
+ {
+ CertificateChainItem item = new CertificateChainItem( cert );
+ if ( parentItem != null )
+ {
+ item.child = parentItem;
+ parentItem.parent = item;
+ }
+ if ( certificateItem == null )
+ {
+ certificateItem = item;
+ }
+ parentItem = item;
+ }
+ hierarchyTreeViewer.setInput( new CertificateChainItem[]
+ { parentItem } );
+ hierarchyTreeViewer.expandAll();
+ hierarchyTreeViewer.setSelection( new StructuredSelection( certificateItem ), true );
+
+ // Details:
+ certificateTree.removeAll();
+ populateCertificateTree();
+ valueText.setText( StringUtils.EMPTY );
+ }
+
+
+ private void populateCertificateTree()
+ {
+ certificateTree.removeAll();
+ valueText.setText( StringUtils.EMPTY );
+
+ IStructuredSelection selection = ( IStructuredSelection ) hierarchyTreeViewer.getSelection();
+ if ( selection.size() != 1 )
+ {
+ return;
+ }
+
+ CertificateChainItem certificateItem = ( CertificateChainItem ) selection.getFirstElement();;
+ X509Certificate certificate = certificateItem.certificate;
+
+ TreeItem rootItem = new TreeItem( certificateTree, SWT.NONE );
+ Map<String, String> attributeMap = getAttributeMap( certificate.getSubjectX500Principal() );
+ rootItem.setText( attributeMap.get( "CN" ) ); //$NON-NLS-1$
+
+ TreeItem certItem = createTreeItem( rootItem,
+ Messages.getString( "CertificateInfoComposite.Certificate" ), StringUtils.EMPTY ); //$NON-NLS-1$
+ createTreeItem( certItem,
+ Messages.getString( "CertificateInfoComposite.Version" ), String.valueOf( certificate.getVersion() ) ); //$NON-NLS-1$
+ createTreeItem( certItem,
+ Messages.getString( "CertificateInfoComposite.SerialNumber" ), certificate.getSerialNumber().toString( 16 ) ); //$NON-NLS-1$
+ createTreeItem( certItem,
+ Messages.getString( "CertificateInfoComposite.Signature" ), certificate.getSigAlgName() ); //$NON-NLS-1$
+
+ // TODO: formatting
+ createTreeItem( certItem,
+ Messages.getString( "CertificateInfoComposite.Issuer" ), certificate.getIssuerX500Principal().getName() ); //$NON-NLS-1$
+
+ TreeItem validityItem = createTreeItem( certItem,
+ Messages.getString( "CertificateInfoComposite.Validity" ), StringUtils.EMPTY ); //$NON-NLS-1$
+ createTreeItem( validityItem,
+ Messages.getString( "CertificateInfoComposite.NotBefore" ), certificate.getNotBefore().toString() ); //$NON-NLS-1$
+ createTreeItem( validityItem,
+ Messages.getString( "CertificateInfoComposite.NotAfter" ), certificate.getNotAfter().toString() ); //$NON-NLS-1$
+
+ // TODO: formatting
+ createTreeItem( certItem,
+ Messages.getString( "CertificateInfoComposite.Subject" ), certificate.getSubjectX500Principal().getName() ); //$NON-NLS-1$
+
+ TreeItem pkiItem = createTreeItem( certItem, Messages
+ .getString( "CertificateInfoComposite.SubjectPublicKeyInfo" ), StringUtils.EMPTY ); //$NON-NLS-1$
+ createTreeItem(
+ pkiItem,
+ Messages.getString( "CertificateInfoComposite.SubjectPublicKeyAlgorithm" ), certificate.getPublicKey().getAlgorithm() ); //$NON-NLS-1$
+ // TODO: formatting
+ createTreeItem(
+ pkiItem,
+ Messages.getString( "CertificateInfoComposite.SubjectPublicKey" ), new String( Hex.encodeHex( certificate.getPublicKey() //$NON-NLS-1$
+ .getEncoded() ) ) );
+
+ TreeItem extItem = createTreeItem( certItem,
+ Messages.getString( "CertificateInfoComposite.Extensions" ), StringUtils.EMPTY ); //$NON-NLS-1$
+ populateExtensions( extItem, certificate, true );
+ populateExtensions( extItem, certificate, false );
+
+ createTreeItem( rootItem,
+ Messages.getString( "CertificateInfoComposite.SignatureAlgorithm" ), certificate.getSigAlgName() ); //$NON-NLS-1$
+ // TODO: formatting
+ createTreeItem(
+ rootItem,
+ Messages.getString( "CertificateInfoComposite.Signature" ), new String( Hex.encodeHex( certificate.getSignature() ) ) ); //$NON-NLS-1$
+
+ rootItem.setExpanded( true );
+ certItem.setExpanded( true );
+ validityItem.setExpanded( true );
+ pkiItem.setExpanded( true );
+ extItem.setExpanded( true );
+ }
+
+
+ private TreeItem createTreeItem( final TreeItem parent, final String field, final String value )
+ {
+ TreeItem item = new TreeItem( parent, SWT.NONE );
+ item.setText( field );
+ item.setData( value );
+ return item;
+ }
+
+
+ private void populateExtensions( final TreeItem extensionsItem, final X509Certificate certificate, boolean critical )
+ {
+ Set<String> oids = critical ? certificate.getCriticalExtensionOIDs() : certificate
+ .getNonCriticalExtensionOIDs();
+
+ if ( oids != null )
+ {
+ for ( String oid : oids )
+ {
+ // try to parse the extension value byte[] to an ASN1 object
+ byte[] extensionValueBin = certificate.getExtensionValue( oid );
+ String extensionValue = null;
+ try
+ {
+ ASN1Object extension = X509ExtensionUtil.fromExtensionValue( extensionValueBin );
+ extensionValue = extension.toString();
+ }
+ catch ( IOException e )
+ {
+ extensionValue = new String( Hex.encodeHex( extensionValueBin ) );
+ }
+
+ String value = Messages.getString( "CertificateInfoComposite.ExtensionOIDColon" ) + oid + '\n'; //$NON-NLS-1$
+ value += Messages.getString( "CertificateInfoComposite.CriticalColon" ) + Boolean.toString( critical ) + '\n'; //$NON-NLS-1$
+ value += Messages.getString( "CertificateInfoComposite.ExtensionValueColon" ) + extensionValue + '\n'; //$NON-NLS-1$
+
+ // TODO: OID descriptions
+ // TODO: formatting of extension value
+ TreeItem item = createTreeItem( extensionsItem, oid, value );
+ createTreeItem( item, Messages.getString( "CertificateInfoComposite.ExtensionOID" ), oid ); //$NON-NLS-1$
+ createTreeItem( item,
+ Messages.getString( "CertificateInfoComposite.Critical" ), Boolean.toString( critical ) ); //$NON-NLS-1$
+ createTreeItem( item, Messages.getString( "CertificateInfoComposite.ExtensionValue" ), extensionValue ); //$NON-NLS-1$
+ }
+ }
+ }
+
+
+ private String getHexString( byte[] bytes )
+ {
+ char[] hex = Hex.encodeHex( bytes );
+ StringBuilder sb = new StringBuilder();
+ for ( int i = 0; i < hex.length; i++ )
+ {
+ if ( i % 2 == 0 && i > 0 )
+ {
+ sb.append( ':' );
+ }
+ sb.append( Character.toUpperCase( hex[i] ) );
+ }
+ return sb.toString();
+ }
+
+
+ /**
+ * Converts the distinguished name of the principal
+ * to a map containing the attribute types and values,
+ * one for each relative distinguished name.
+ *
+ * @param principal the principal
+ * @return the map containing attribute types and values
+ */
+ private Map<String, String> getAttributeMap( X500Principal principal )
+ {
+ Map<String, String> map = new HashMap<String, String>();
+
+ // populate map with default values
+ for ( String attribute : ATTRIBUTES )
+ {
+ map.put( attribute, "-" ); //$NON-NLS-1$
+
+ }
+
+ // populate map with principal's name
+ try
+ {
+ String name = principal.getName();
+ LdapName dn = new LdapName( name );
+ List<Rdn> rdns = dn.getRdns();
+ for ( Rdn rdn : rdns )
+ {
+ map.put( rdn.getType().toUpperCase(), rdn.getValue().toString() );
+ }
+ }
+ catch ( NamingException e )
+ {
+ map.put( "CN", e.getMessage() ); //$NON-NLS-1$
+ }
+
+ return map;
+ }
+
+ class HierarchyContentProvider implements ITreeContentProvider
+ {
+
+ public Object[] getChildren( Object parentElement )
+ {
+ if ( parentElement instanceof CertificateChainItem )
+ {
+ CertificateChainItem item = ( CertificateChainItem ) parentElement;
+ if ( item.child != null )
+ {
+ return new CertificateChainItem[]
+ { item.child };
+ }
+ }
+ return new Object[0];
+ }
+
+
+ public Object getParent( Object element )
+ {
+ if ( element instanceof CertificateChainItem )
+ {
+ CertificateChainItem item = ( CertificateChainItem ) element;
+ return item.parent;
+ }
+ return null;
+ }
+
+
+ public boolean hasChildren( Object element )
+ {
+ return getChildren( element ).length > 0;
+ }
+
+
+ public Object[] getElements( Object inputElement )
+ {
+ if ( inputElement instanceof CertificateChainItem[] )
+ {
+ return ( CertificateChainItem[] ) inputElement;
+ }
+ return getChildren( inputElement );
+ }
+
+
+ public void dispose()
+ {
+ }
+
+
+ public void inputChanged( Viewer viewer, Object oldInput, Object newInput )
+ {
+ }
+
+ }
+
+ class HierarchyLabelProvider extends LabelProvider
+ {
+ @Override
+ public String getText( Object element )
+ {
+ if ( element instanceof CertificateChainItem )
+ {
+ CertificateChainItem item = ( CertificateChainItem ) element;
+ Map<String, String> attributeMap = getAttributeMap( item.certificate.getSubjectX500Principal() );
+ return attributeMap.get( "CN" ); //$NON-NLS-1$
+ }
+ return null;
+ }
+ }
+
+ class CertificateChainItem
+ {
+ X509Certificate certificate;
+ CertificateChainItem parent;
+ CertificateChainItem child;
+
+
+ public CertificateChainItem( X509Certificate certificate )
+ {
+ this.certificate = certificate;
+ }
+ }
+}
Propchange: directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/CertificateInfoComposite.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/messages.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/messages.properties?rev=777201&r1=777200&r2=777201&view=diff
==============================================================================
--- directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/messages.properties (original)
+++ directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/messages.properties Thu May 21 17:50:11 2009
@@ -1,3 +1,4 @@
+#Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
# 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
@@ -15,33 +16,72 @@
# specific language governing permissions and limitations
# under the License.
-AuthenticationParameterPage.BindDNOrUser=Bind DN or user:
-AuthenticationParameterPage.AnonymousAuthentication=No Authentication
-AuthenticationParameterPage.AuthenticationMethod=Authentication Method
-AuthenticationParameterPage.AuthenticationParameter=Authentication Parameter
-AuthenticationParameterPage.AuthenticationSuccessfull=The authentication was successful.
-AuthenticationParameterPage.BindPassword=Bind password:
-AuthenticationParameterPage.CheckAuthentication=Check Authentication
-AuthenticationParameterPage.CramMD5=CRAM-MD5 (SASL)
-AuthenticationParameterPage.DigestMD5=DIGEST-MD5 (SASL)
-AuthenticationParameterPage.PleaseEnterBindDNOrUser=Please enter a bind DN or user.
-AuthenticationParameterPage.PleaseEnterBindPassword=Please enter a bind password.
-AuthenticationParameterPage.PleasEnterSASL=Please enter an SASL Realm otherwise any available SASL realm is choosen
-AuthenticationParameterPage.SASLRealm=SASL Realm:
-AuthenticationParameterPage.SavePassword=Save password
-AuthenticationParameterPage.SimpleAuthentication=Simple Authentication
-NetworkParameterPage.CheckNetworkParameter=Check Network Parameter
-NetworkParameterPage.ConnectionEstablished=The connection was established successfully.
-NetworkParameterPage.ConnectionExists=A connection named "{0}" already exists.
-NetworkParameterPage.ConnectionName=Connection name:
-NetworkParameterPage.EncryptionMethod=Encryption method:
-NetworkParameterPage.HostName=Hostname:
-NetworkParameterPage.NetworkParameter=Network Parameter
-NetworkParameterPage.NoEncryption=No encryption
-NetworkParameterPage.PleaseEnterConnectionName=Please enter a connection name.
-NetworkParameterPage.PleaseEnterHostname=Please enter a hostname.
-NetworkParameterPage.PleaseEnterPort=Please enter a port. The default LDAP port is 389.
-NetworkParameterPage.Port=Port:
-NetworkParameterPage.UseSSLEncryption=Use SSL encryption (ldaps://)
-NetworkParameterPage.UseStartTLS=Use StartTLS extension
-NetworkParameterPage.WarningCertificateValidation=Warning\:\nCertificate validation is disabled, \nbe aware of invalid certificates or man-in-the-middle attacks\!
+AuthenticationParameterPage.AnonymousAuthentication = No Authentication
+AuthenticationParameterPage.AuthenticationMethod = Authentication Method
+AuthenticationParameterPage.AuthenticationParameter = Authentication Parameter
+AuthenticationParameterPage.AuthenticationSuccessfull = The authentication was successful.
+AuthenticationParameterPage.BindDNOrUser = Bind DN or user:
+AuthenticationParameterPage.BindPassword = Bind password:
+AuthenticationParameterPage.CheckAuthentication = Check Authentication
+AuthenticationParameterPage.CramMD5 = CRAM-MD5 (SASL)
+AuthenticationParameterPage.DigestMD5 = DIGEST-MD5 (SASL)
+AuthenticationParameterPage.PleasEnterSASL = Please enter an SASL Realm otherwise any available SASL realm is choosen
+AuthenticationParameterPage.PleaseEnterBindDNOrUser = Please enter a bind DN or user.
+AuthenticationParameterPage.PleaseEnterBindPassword = Please enter a bind password.
+AuthenticationParameterPage.SASLRealm = SASL Realm:
+AuthenticationParameterPage.SavePassword = Save password
+AuthenticationParameterPage.SimpleAuthentication = Simple Authentication
+
+CertificateInfoComposite.Certificate = Certificate
+CertificateInfoComposite.CertificateFieldsLabel = Certificate Fields
+CertificateInfoComposite.CertificateHierarchyLabel = Certificate Hierarchy
+CertificateInfoComposite.CommonNameLabel = Common name (CN):
+CertificateInfoComposite.Critical = Critical
+CertificateInfoComposite.CriticalColon = Critical :
+CertificateInfoComposite.Details = Details
+CertificateInfoComposite.ExpiresOnLabel = Expires on:
+CertificateInfoComposite.ExtensionOID = Extension OID
+CertificateInfoComposite.ExtensionOIDColon = Extension OID :
+CertificateInfoComposite.ExtensionValue = Extension Value
+CertificateInfoComposite.ExtensionValueColon = Extension Value:
+CertificateInfoComposite.Extensions = Extensions
+CertificateInfoComposite.FieldValuesLabel = Field Value
+CertificateInfoComposite.FingerprintsLabel = Fingerprints
+CertificateInfoComposite.General = General
+CertificateInfoComposite.IssuedByLabel = Issued By
+CertificateInfoComposite.IssuedOnLabel = Issued on:
+CertificateInfoComposite.IssuedToLabel = Issued To
+CertificateInfoComposite.Issuer = Issuer
+CertificateInfoComposite.MD5FingerprintLabel = MD5 fingerprint:
+CertificateInfoComposite.NotAfter = Not After
+CertificateInfoComposite.NotBefore = Not Before
+CertificateInfoComposite.OrganizationLabel = Organization (O):
+CertificateInfoComposite.OrganizationalUnitLabel = Organizational unit (OU):
+CertificateInfoComposite.SHA1FingerprintLabel = SHA1 fingerprint:
+CertificateInfoComposite.SerialNumber = Serial Number
+CertificateInfoComposite.SerialNumberLabel = Serial number:
+CertificateInfoComposite.Signature = Signature
+CertificateInfoComposite.SignatureAlgorithm = Signature Algorithm
+CertificateInfoComposite.Subject = Subject
+CertificateInfoComposite.SubjectPublicKey = Subject Public Key
+CertificateInfoComposite.SubjectPublicKeyAlgorithm = Subject Public Key Algorithm
+CertificateInfoComposite.SubjectPublicKeyInfo = Subject Public Key Info
+CertificateInfoComposite.Validity = Validity
+CertificateInfoComposite.ValidityLabel = Validity
+CertificateInfoComposite.Version = Version
+
+NetworkParameterPage.CheckNetworkParameter = Check Network Parameter
+NetworkParameterPage.ConnectionEstablished = The connection was established successfully.
+NetworkParameterPage.ConnectionExists = A connection named "{0}" already exists.
+NetworkParameterPage.ConnectionName = Connection name:
+NetworkParameterPage.EncryptionMethod = Encryption method:
+NetworkParameterPage.HostName = Hostname:
+NetworkParameterPage.NetworkParameter = Network Parameter
+NetworkParameterPage.NoEncryption = No encryption
+NetworkParameterPage.PleaseEnterConnectionName = Please enter a connection name.
+NetworkParameterPage.PleaseEnterHostname = Please enter a hostname.
+NetworkParameterPage.PleaseEnterPort = Please enter a port. The default LDAP port is 389.
+NetworkParameterPage.Port = Port:
+NetworkParameterPage.UseSSLEncryption = Use SSL encryption (ldaps://)
+NetworkParameterPage.UseStartTLS = Use StartTLS extension
+NetworkParameterPage.WarningCertificateValidation = Warning:\nCertificate validation is disabled, \nbe aware of invalid certificates or man-in-the-middle attacks!
Modified: directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/messages_de.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/messages_de.properties?rev=777201&r1=777200&r2=777201&view=diff
==============================================================================
--- directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/messages_de.properties (original)
+++ directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/messages_de.properties Thu May 21 17:50:11 2009
@@ -1,3 +1,4 @@
+#Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
# 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
@@ -15,30 +16,69 @@
# specific language governing permissions and limitations
# under the License.
-AuthenticationParameterPage.BindDNOrUser=Bind DN oder Benutzer\:
-AuthenticationParameterPage.AnonymousAuthentication=Keine Authentifizierung
-AuthenticationParameterPage.AuthenticationMethod=Authentifizierungs-Methode
-AuthenticationParameterPage.AuthenticationParameter=Authentifizierungs-Parameter
-AuthenticationParameterPage.AuthenticationSuccessfull=Die Authentifizierung war erfolgreich.
-AuthenticationParameterPage.BindPassword=Bind Passwort\:
-AuthenticationParameterPage.CheckAuthentication=Authentifizierung \u00FCberpr\u00FCfen
-AuthenticationParameterPage.CramMD5=CRAM-MD5 (SASL)
-AuthenticationParameterPage.DigestMD5=DIGEST-MD5 (SASL)
-AuthenticationParameterPage.PleaseEnterBindDNOrUser=Bitte Bind DN oder Benutzer eingeben.
-AuthenticationParameterPage.PleaseEnterBindPassword=Bitte Bind Passwort eingeben.
-AuthenticationParameterPage.PleasEnterSASL=Geben Sie bitte einen SASL Realm ein, ansonsten wird (irgend-) ein verf\u00FCgbarer SASL Realm ausgew\u00E4hlt
-AuthenticationParameterPage.SavePassword=Passwort speichern
-AuthenticationParameterPage.SimpleAuthentication=Einfache Authentifizierung
-NetworkParameterPage.CheckNetworkParameter=Netzwerkparameter \u00FCberpr\u00FCfen
-NetworkParameterPage.ConnectionEstablished=Die Verbindung wurde erfolgreich aufgebaut.
-NetworkParameterPage.ConnectionExists=Eine Verbindung mit dem Namen "{0}" existiert bereits.
-NetworkParameterPage.ConnectionName=Verbindungsname\:
-NetworkParameterPage.EncryptionMethod=Verschl\u00FCsselungs-Methode\:
-NetworkParameterPage.NetworkParameter=Netzwerkparameter
-NetworkParameterPage.NoEncryption=Keine Verschl\u00FCsselung
-NetworkParameterPage.PleaseEnterConnectionName=Geben Sie bitte einen Verbindungsnamen ein.
-NetworkParameterPage.PleaseEnterHostname=Geben Sie bitte einen Hostnamen ein.
-NetworkParameterPage.PleaseEnterPort=Geben Sie bitte einen Port ein. LDAP Standard ist Port 389.
-NetworkParameterPage.UseSSLEncryption=SSL Verschl\u00FCsselung (ldaps\://)
-NetworkParameterPage.UseStartTLS=StartTLS Erweiterung
-NetworkParameterPage.WarningCertificateValidation=Warnung\:\nZertifikat Validierung ist deaktiviert,\nsind Sie sich der Gefahr von ung\u00FCltigen Zertifikaten\noder 'man-in-the-middle' Angriffen bewusst\!
+AuthenticationParameterPage.AnonymousAuthentication = Keine Authentifizierung
+AuthenticationParameterPage.AuthenticationMethod = Authentifizierungs-Methode
+AuthenticationParameterPage.AuthenticationParameter = Authentifizierungs-Parameter
+AuthenticationParameterPage.AuthenticationSuccessfull = Die Authentifizierung war erfolgreich.
+AuthenticationParameterPage.BindDNOrUser = Bind DN oder Benutzer:
+AuthenticationParameterPage.BindPassword = Bind Passwort:
+AuthenticationParameterPage.CheckAuthentication = Authentifizierung \u00FCberpr\u00FCfen
+AuthenticationParameterPage.CramMD5 = CRAM-MD5 (SASL)
+AuthenticationParameterPage.DigestMD5 = DIGEST-MD5 (SASL)
+AuthenticationParameterPage.PleasEnterSASL = Geben Sie bitte einen SASL Realm ein, ansonsten wird (irgend-) ein verf\u00FCgbarer SASL Realm ausgew\u00E4hlt
+AuthenticationParameterPage.PleaseEnterBindDNOrUser = Bitte Bind DN oder Benutzer eingeben.
+AuthenticationParameterPage.PleaseEnterBindPassword = Bitte Bind Passwort eingeben.
+AuthenticationParameterPage.SavePassword = Passwort speichern
+AuthenticationParameterPage.SimpleAuthentication = Einfache Authentifizierung
+
+CertificateInfoComposite.Certificate = Zertifikat
+CertificateInfoComposite.CertificateFieldsLabel = Zertifikatsfelder
+CertificateInfoComposite.CertificateHierarchyLabel = Zertifikatshierarchie
+CertificateInfoComposite.CommonNameLabel = Allgemeiner Name (CN):
+CertificateInfoComposite.Critical = Kritisch
+CertificateInfoComposite.CriticalColon = Kritisch :
+CertificateInfoComposite.Details = Details
+CertificateInfoComposite.ExpiresOnLabel = L\u00E4uft ab am:
+CertificateInfoComposite.ExtensionOID = Erweiterungs-OID
+CertificateInfoComposite.ExtensionOIDColon = Erweiterungs-OID :
+CertificateInfoComposite.ExtensionValue = Erweiterungs-Wert
+CertificateInfoComposite.ExtensionValueColon = Erweiterungs-Wert:
+CertificateInfoComposite.Extensions = Erweiterungen
+CertificateInfoComposite.FieldValuesLabel = Feld-Wert
+CertificateInfoComposite.FingerprintsLabel = Fingerabdr\u00FCcke
+CertificateInfoComposite.General = Allgemein
+CertificateInfoComposite.IssuedByLabel = Ausgestellt von
+CertificateInfoComposite.IssuedOnLabel = Ausgestellt am:
+CertificateInfoComposite.IssuedToLabel = Ausgestellt f\u00FCr
+CertificateInfoComposite.Issuer = Aussteller
+CertificateInfoComposite.MD5FingerprintLabel = MD5 Fingerabdruck:
+CertificateInfoComposite.NotAfter = Nicht nach
+CertificateInfoComposite.NotBefore = Nicht vor
+CertificateInfoComposite.OrganizationLabel = Organisation (O):
+CertificateInfoComposite.OrganizationalUnitLabel = Organisationseinheit (OU):
+CertificateInfoComposite.SHA1FingerprintLabel = SHA1 Fingerabdruck:
+CertificateInfoComposite.SerialNumber = Seriennummer
+CertificateInfoComposite.SerialNumberLabel = Seriennummer:
+CertificateInfoComposite.Signature = Signatur
+CertificateInfoComposite.SignatureAlgorithm = Signatur Algorithmus
+CertificateInfoComposite.Subject = Inhaber
+CertificateInfoComposite.SubjectPublicKey = \u00D6ffentlicher Schl\u00FCssel des Inhabers
+CertificateInfoComposite.SubjectPublicKeyAlgorithm = Algorithmus des \u00F6ffentlichen Schl\u00FCssels des Inhabers
+CertificateInfoComposite.SubjectPublicKeyInfo = Angaben zum \u00F6ffentlichen Schl\u00FCssel des Inhabers
+CertificateInfoComposite.Validity = G\u00FCltigkeit
+CertificateInfoComposite.ValidityLabel = G\u00FCltigkeit
+CertificateInfoComposite.Version = Version
+
+NetworkParameterPage.CheckNetworkParameter = Netzwerkparameter \u00FCberpr\u00FCfen
+NetworkParameterPage.ConnectionEstablished = Die Verbindung wurde erfolgreich aufgebaut.
+NetworkParameterPage.ConnectionExists = Eine Verbindung mit dem Namen "{0}" existiert bereits.
+NetworkParameterPage.ConnectionName = Verbindungsname:
+NetworkParameterPage.EncryptionMethod = Verschl\u00FCsselungs-Methode:
+NetworkParameterPage.NetworkParameter = Netzwerkparameter
+NetworkParameterPage.NoEncryption = Keine Verschl\u00FCsselung
+NetworkParameterPage.PleaseEnterConnectionName = Geben Sie bitte einen Verbindungsnamen ein.
+NetworkParameterPage.PleaseEnterHostname = Geben Sie bitte einen Hostnamen ein.
+NetworkParameterPage.PleaseEnterPort = Geben Sie bitte einen Port ein. LDAP Standard ist Port 389.
+NetworkParameterPage.UseSSLEncryption = SSL Verschl\u00FCsselung (ldaps://)
+NetworkParameterPage.UseStartTLS = StartTLS Erweiterung
+NetworkParameterPage.WarningCertificateValidation = Warnung:\nZertifikat Validierung ist deaktiviert,\nsind Sie sich der Gefahr von ung\u00FCltigen Zertifikaten\noder 'man-in-the-middle' Angriffen bewusst!
Modified: directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/messages_fr.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/messages_fr.properties?rev=777201&r1=777200&r2=777201&view=diff
==============================================================================
--- directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/messages_fr.properties (original)
+++ directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/messages_fr.properties Thu May 21 17:50:11 2009
@@ -1,3 +1,4 @@
+#Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
# 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
@@ -15,30 +16,69 @@
# specific language governing permissions and limitations
# under the License.
-AuthenticationParameterPage.BindDNOrUser=Bind DN ou nom d'utilisateur (SASL):
-AuthenticationParameterPage.AnonymousAuthentication=Pas d'authentification
-AuthenticationParameterPage.AuthenticationMethod=M\u00E9thode d'authentification
-AuthenticationParameterPage.AuthenticationParameter=Param\u00E8tres d'authentification
-AuthenticationParameterPage.AuthenticationSuccessfull=L'authentification a r\u00E9ussie
-AuthenticationParameterPage.BindPassword=Mot de passe:
-AuthenticationParameterPage.CheckAuthentication=V\u00E9rifier l'authentification
-AuthenticationParameterPage.PleaseEnterBindDNOrUser=Veuillez entrer un DN ou un identifiant d'utilisateur.
-AuthenticationParameterPage.PleaseEnterBindPassword=Veuillez entrer un mot de passe
-AuthenticationParameterPage.PleasEnterSASL=Veuillez entrer un domaine SASL sinon un des domaines disponibles sera s\u00E9lectionn\u00E9.
-AuthenticationParameterPage.SASLRealm=Realm SASL:
-AuthenticationParameterPage.SavePassword=Sauvegarder le mot de passe
-AuthenticationParameterPage.SimpleAuthentication=Authentification simple
-NetworkParameterPage.CheckNetworkParameter=V\u00E9rifier les param\u00E8tres r\u00E9seau
-NetworkParameterPage.ConnectionEstablished=La connexion a \u00E9t\u00E9 \u00E9tablie avec succ\u00E8s
-NetworkParameterPage.ConnectionExists=Le nom "{0}" correspond \u00E0 une connexion existante.
-NetworkParameterPage.ConnectionName=Nom de connexion :
-NetworkParameterPage.EncryptionMethod=M\u00E9thode d'encryption :
-NetworkParameterPage.HostName=Nom d'h\u00F4te:
-NetworkParameterPage.NetworkParameter=Param\u00E8tres r\u00E9seau
-NetworkParameterPage.NoEncryption=Pas d'encryption
-NetworkParameterPage.PleaseEnterConnectionName=Veuillez entrer un nom de connexion.
-NetworkParameterPage.PleaseEnterHostname=Veuillez entrer un nom d'h\u00F4te.
-NetworkParameterPage.PleaseEnterPort=Veuillez entrer un port. Le port par d\u00E9fault pour LDAP est 389.
-NetworkParameterPage.UseSSLEncryption=Utilise l'encryption SSL (ldaps://)
-NetworkParameterPage.UseStartTLS=Utilise l'extension StartTLS
-NetworkParameterPage.WarningCertificateValidation=TODO:Attention :\n Certificate validation is disabled, \nm\u00E9fiez-vous des certificats invalides ou des attaques par interposition (man-in-the-middle)\!
+AuthenticationParameterPage.AnonymousAuthentication = Pas d'authentification
+AuthenticationParameterPage.AuthenticationMethod = M\u00E9thode d'authentification
+AuthenticationParameterPage.AuthenticationParameter = Param\u00E8tres d'authentification
+AuthenticationParameterPage.AuthenticationSuccessfull = L'authentification a r\u00E9ussie
+AuthenticationParameterPage.BindDNOrUser = Bind DN ou nom d'utilisateur (SASL):
+AuthenticationParameterPage.BindPassword = Mot de passe:
+AuthenticationParameterPage.CheckAuthentication = V\u00E9rifier l'authentification
+AuthenticationParameterPage.PleasEnterSASL = Veuillez entrer un domaine SASL sinon un des domaines disponibles sera s\u00E9lectionn\u00E9.
+AuthenticationParameterPage.PleaseEnterBindDNOrUser = Veuillez entrer un DN ou un identifiant d'utilisateur.
+AuthenticationParameterPage.PleaseEnterBindPassword = Veuillez entrer un mot de passe
+AuthenticationParameterPage.SASLRealm = Realm SASL:
+AuthenticationParameterPage.SavePassword = Sauvegarder le mot de passe
+AuthenticationParameterPage.SimpleAuthentication = Authentification simple
+
+CertificateInfoComposite.Certificate = TODO:Certificate
+CertificateInfoComposite.CertificateFieldsLabel = TODO:Certificate Fields
+CertificateInfoComposite.CertificateHierarchyLabel = TODO:Certificate Hierarchy
+CertificateInfoComposite.CommonNameLabel = TODO:Common name (CN):
+CertificateInfoComposite.Critical = TODO:Critical
+CertificateInfoComposite.CriticalColon = TODO:Critical :
+CertificateInfoComposite.Details = TODO:Details
+CertificateInfoComposite.ExpiresOnLabel = TODO:Expires on:
+CertificateInfoComposite.ExtensionOID = TODO:Extension OID
+CertificateInfoComposite.ExtensionOIDColon = TODO:Extension OID :
+CertificateInfoComposite.ExtensionValue = TODO:Extension Value
+CertificateInfoComposite.ExtensionValueColon = TODO:Extension Value:
+CertificateInfoComposite.Extensions = TODO:Extensions
+CertificateInfoComposite.FieldValuesLabel = TODO:Field Value
+CertificateInfoComposite.FingerprintsLabel = TODO:Fingerprints
+CertificateInfoComposite.General = TODO:General
+CertificateInfoComposite.IssuedByLabel = TODO:Issued By
+CertificateInfoComposite.IssuedOnLabel = TODO:Issued on:
+CertificateInfoComposite.IssuedToLabel = TODO:Issued To
+CertificateInfoComposite.Issuer = TODO:Issuer
+CertificateInfoComposite.MD5FingerprintLabel = TODO:MD5 fingerprint:
+CertificateInfoComposite.NotAfter = TODO:Not After
+CertificateInfoComposite.NotBefore = TODO:Not Before
+CertificateInfoComposite.OrganizationLabel = TODO:Organization (O):
+CertificateInfoComposite.OrganizationalUnitLabel = TODO:Organizational unit (OU):
+CertificateInfoComposite.SHA1FingerprintLabel = TODO:SHA1 fingerprint:
+CertificateInfoComposite.SerialNumber = TODO:Serial Number
+CertificateInfoComposite.SerialNumberLabel = TODO:Serial number:
+CertificateInfoComposite.Signature = TODO:Signature
+CertificateInfoComposite.SignatureAlgorithm = TODO:Signature Algorithm
+CertificateInfoComposite.Subject = TODO:Subject
+CertificateInfoComposite.SubjectPublicKey = TODO:Subject Public Key
+CertificateInfoComposite.SubjectPublicKeyAlgorithm = TODO:Subject Public Key Algorithm
+CertificateInfoComposite.SubjectPublicKeyInfo = TODO:Subject Public Key Info
+CertificateInfoComposite.Validity = TODO:Validity
+CertificateInfoComposite.ValidityLabel = TODO:Validity
+CertificateInfoComposite.Version = TODO:Version
+
+NetworkParameterPage.CheckNetworkParameter = V\u00E9rifier les param\u00E8tres r\u00E9seau
+NetworkParameterPage.ConnectionEstablished = La connexion a \u00E9t\u00E9 \u00E9tablie avec succ\u00E8s
+NetworkParameterPage.ConnectionExists = Le nom "{0}" correspond \u00E0 une connexion existante.
+NetworkParameterPage.ConnectionName = Nom de connexion :
+NetworkParameterPage.EncryptionMethod = M\u00E9thode d'encryption :
+NetworkParameterPage.HostName = Nom d'h\u00F4te:
+NetworkParameterPage.NetworkParameter = Param\u00E8tres r\u00E9seau
+NetworkParameterPage.NoEncryption = Pas d'encryption
+NetworkParameterPage.PleaseEnterConnectionName = Veuillez entrer un nom de connexion.
+NetworkParameterPage.PleaseEnterHostname = Veuillez entrer un nom d'h\u00F4te.
+NetworkParameterPage.PleaseEnterPort = Veuillez entrer un port. Le port par d\u00E9fault pour LDAP est 389.
+NetworkParameterPage.UseSSLEncryption = Utilise l'encryption SSL (ldaps://)
+NetworkParameterPage.UseStartTLS = Utilise l'extension StartTLS
+NetworkParameterPage.WarningCertificateValidation = TODO:Attention :\n Certificate validation is disabled, \nm\u00E9fiez-vous des certificats invalides ou des attaques par interposition (man-in-the-middle)!
Modified: directory/studio/trunk/jars/pom.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/jars/pom.xml?rev=777201&r1=777200&r2=777201&view=diff
==============================================================================
--- directory/studio/trunk/jars/pom.xml (original)
+++ directory/studio/trunk/jars/pom.xml Thu May 21 17:50:11 2009
@@ -195,5 +195,10 @@
<groupId>xpp3</groupId>
<artifactId>xpp3</artifactId>
</dependency>
+ <dependency>
+ <groupId>bouncycastle</groupId>
+ <artifactId>bcprov-jdk15</artifactId>
+ <version>140</version>
+ </dependency>
</dependencies>
-</project>
\ No newline at end of file
+</project>