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 2018/08/06 04:03:29 UTC
[directory-studio] branch master updated: RSTUDIO-1190: Keystore
change from JKS to PKCS12
This is an automated email from the ASF dual-hosted git repository.
seelmann pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/directory-studio.git
The following commit(s) were added to refs/heads/master by this push:
new 6e9e6c2 RSTUDIO-1190: Keystore change from JKS to PKCS12
6e9e6c2 is described below
commit 6e9e6c2571bbf53cb9b657a740a0225a4d348200
Author: Stefan Seelmann <ma...@stefan-seelmann.de>
AuthorDate: Mon Aug 6 06:03:08 2018 +0200
RSTUDIO-1190: Keystore change from JKS to PKCS12
* Use JDK default keystore everywhere
* PKCS12 key store requires password if same keystore file is used as truststore
* Update parent pom
---
README.md | 1 +
.../org.apache.directory.studio.eclipse-trgt-platform.template | 2 +-
.../directory/studio/connection/core/StudioKeyStoreManager.java | 4 ++--
pom.xml | 2 +-
.../studio/test/integration/ui/CertificateValidationTest.java | 9 ++++++---
5 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/README.md b/README.md
index fbc9113..fc4b4a4 100644
--- a/README.md
+++ b/README.md
@@ -70,6 +70,7 @@ Tycho doesn't handle snapshot dependencies well. The first time a snapshot depen
To delete all Apache Directory related snapshots run:
rm -rf ~/.m2/repository/p2/osgi/bundle/org.apache.directory.*
+ <workspace>/.metadata/.plugins/org.eclipse.pde.core/.bundle_pool/*
## Setup Eclipse workspace
diff --git a/eclipse-trgt-platform/template/org.apache.directory.studio.eclipse-trgt-platform.template b/eclipse-trgt-platform/template/org.apache.directory.studio.eclipse-trgt-platform.template
index 08d4760..420c77c 100644
--- a/eclipse-trgt-platform/template/org.apache.directory.studio.eclipse-trgt-platform.template
+++ b/eclipse-trgt-platform/template/org.apache.directory.studio.eclipse-trgt-platform.template
@@ -19,7 +19,7 @@
@author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-->
<?pde version="3.8"?>
-<target name="Apache Directory Studio Platform" sequenceNumber="335">
+<target name="Apache Directory Studio Platform" sequenceNumber="351">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
diff --git a/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/StudioKeyStoreManager.java b/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/StudioKeyStoreManager.java
index 3e623c7..74c853e 100644
--- a/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/StudioKeyStoreManager.java
+++ b/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/StudioKeyStoreManager.java
@@ -126,7 +126,7 @@ public class StudioKeyStoreManager
{
try
{
- memoryKeyStore = KeyStore.getInstance( "JKS" ); //$NON-NLS-1$
+ memoryKeyStore = KeyStore.getInstance( KeyStore.getDefaultType() );
memoryKeyStore.load( null, null );
}
catch ( Exception e )
@@ -147,7 +147,7 @@ public class StudioKeyStoreManager
{
try
{
- KeyStore fileKeyStore = KeyStore.getInstance( "JKS" ); //$NON-NLS-1$
+ KeyStore fileKeyStore = KeyStore.getInstance( KeyStore.getDefaultType() );
File file = ConnectionCorePlugin.getDefault().getStateLocation().append( filename ).toFile();
if ( file.exists() && file.isFile() && file.canRead() )
{
diff --git a/pom.xml b/pom.xml
index 41310c5..0edcbb0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.directory.project</groupId>
<artifactId>project</artifactId>
- <version>39</version>
+ <version>42</version>
<relativePath />
</parent>
diff --git a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/CertificateValidationTest.java b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/CertificateValidationTest.java
index 7105da0..b7aa14c 100644
--- a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/CertificateValidationTest.java
+++ b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/CertificateValidationTest.java
@@ -145,9 +145,10 @@ public class CertificateValidationTest
}
// delete custom Java key store settings
- System.getProperties().remove( "javax.net.ssl.trustStore" );
- System.getProperties().remove( "javax.net.ssl.keyStore" );
- System.getProperties().remove( "javax.net.ssl.keyStorePassword" );
+ System.clearProperty( "javax.net.ssl.trustStore" );
+ System.clearProperty( "javax.net.ssl.trustStorePassword" );
+ System.clearProperty( "javax.net.ssl.keyStore" );
+ System.clearProperty( "javax.net.ssl.keyStorePassword" );
}
@@ -175,6 +176,7 @@ public class CertificateValidationTest
// let Java use the key store
System.setProperty( "javax.net.ssl.trustStore", ksFile.getAbsolutePath() );
+ System.setProperty( "javax.net.ssl.trustStorePassword", "changeit" );
System.setProperty( "javax.net.ssl.keyStore", ksFile.getAbsolutePath() );
System.setProperty( "javax.net.ssl.keyStorePassword", "changeit" );
@@ -415,6 +417,7 @@ public class CertificateValidationTest
// let Java use the key store
System.setProperty( "javax.net.ssl.trustStore", ksFile.getAbsolutePath() );
+ System.setProperty( "javax.net.ssl.trustStorePassword", "changeit" );
System.setProperty( "javax.net.ssl.keyStore", ksFile.getAbsolutePath() );
System.setProperty( "javax.net.ssl.keyStorePassword", "changeit" );