diff --git a/ccm-core/lib/bcprov-jdk16-144.jar b/ccm-core/lib/bcprov-jdk16-144.jar
new file mode 100755
index 000000000..591554bd2
Binary files /dev/null and b/ccm-core/lib/bcprov-jdk16-144.jar differ
diff --git a/ccm-core/lib/bcprov-jdk16-LICENSE.txt b/ccm-core/lib/bcprov-jdk16-LICENSE.txt
new file mode 100755
index 000000000..7af2bd791
--- /dev/null
+++ b/ccm-core/lib/bcprov-jdk16-LICENSE.txt
@@ -0,0 +1,13 @@
+Copyright (c) 2000 - 2009 The Legion Of The Bouncy Castle (http://www.bouncycastle.org)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Copyright (c) 2000 - 2009 The Legion Of The Bouncy Castle (http://www.bouncycastle.org)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/ccm-core/src/com/arsdigita/kernel/security/Crypto.java b/ccm-core/src/com/arsdigita/kernel/security/Crypto.java
index 631aaa790..50f8de0f5 100755
--- a/ccm-core/src/com/arsdigita/kernel/security/Crypto.java
+++ b/ccm-core/src/com/arsdigita/kernel/security/Crypto.java
@@ -18,8 +18,6 @@
*/
package com.arsdigita.kernel.security;
-import com.arsdigita.util.UncheckedWrapperException;
-
import java.io.UnsupportedEncodingException;
import java.security.GeneralSecurityException;
import java.security.InvalidKeyException;
@@ -31,6 +29,7 @@ import java.security.Security;
import java.security.spec.AlgorithmParameterSpec;
import java.util.Iterator;
import java.util.Set;
+
import javax.crypto.Cipher;
import javax.crypto.Mac;
import javax.crypto.SecretKey;
@@ -41,16 +40,19 @@ import javax.crypto.spec.SecretKeySpec;
import org.apache.commons.codec.binary.Base64;
import org.apache.log4j.Logger;
+import org.bouncycastle.jce.provider.BouncyCastleProvider;
+
+import com.arsdigita.util.UncheckedWrapperException;
/**
* Provides cryptographic functions and stores the server's secret key.
*
* @author Sameer Ajmani
* @since ACS 4.5
+ * @version $Id: Crypto.java 738 2005-09-01 12:36:52Z sskracic $
**/
public class Crypto {
- public static final String versionId = "$Id: Crypto.java 738 2005-09-01 12:36:52Z sskracic $ by $Author: sskracic $, $DateTime: 2004/08/16 18:10:38 $";
private static final Logger s_log =
Logger.getLogger(Crypto.class);
private static int PBE_SALT_BYTES = 8; // required by SunJCE
@@ -64,6 +66,10 @@ public class Crypto {
public static final String CHARACTER_ENCODING = "UTF-8";
+ static {
+ Security.addProvider(new BouncyCastleProvider());
+ }
+
/**
* Creates a new Message Authentication Code (MAC) calculator that uses
* the server's secret key.
@@ -103,7 +109,7 @@ public class Crypto {
} catch (NoSuchAlgorithmException ex) {
String msg =
"Couldn't find " + PREFERRED_MAC_ALGO + ". Make sure you have the right" +
- "provider(s) installed. Check $JAVA_HOME/jre/lib/java.security";
+ "provider(s) installed. Check $JAVA_HOME/jre/lib/security/java.security";
s_log.error(msg, ex);
throw new KernelLoginException(msg, ex);
}
@@ -348,10 +354,18 @@ public class Crypto {
Provider[] jceProviders = Security.getProviders();
for (int i = 0 ; i < jceProviders.length ; i++) {
+
+ if (s_log.isDebugEnabled()) {
+ s_log.info("Security provider: " + jceProviders[i].getName());
+ }
Set e = jceProviders[i].entrySet();
Iterator iterator = e.iterator();
while ( iterator.hasNext() ) {
String current = iterator.next().toString();
+
+ if (s_log.isDebugEnabled()) {
+ s_log.info("\t" + current);
+ }
if ( current.startsWith("Mac") ) {
algorithm = current.substring(4,current.indexOf("="));
if ( algorithm.indexOf("ImplementedIn") == -1 &&
diff --git a/tools-ng/ecdc/eclipseConnector/dotclasspath b/tools-ng/ecdc/eclipseConnector/dotclasspath
index 2476ca590..802b63ee2 100644
--- a/tools-ng/ecdc/eclipseConnector/dotclasspath
+++ b/tools-ng/ecdc/eclipseConnector/dotclasspath
@@ -172,5 +172,6 @@
+
diff --git a/tools-ng/sql/postgres/create_db.sql b/tools-ng/sql/postgres/create_db.sql
new file mode 100755
index 000000000..197a6454a
--- /dev/null
+++ b/tools-ng/sql/postgres/create_db.sql
@@ -0,0 +1,5 @@
+-- Usage: psql --username=postgres --file=create_db.sql
+-- createlang --username=ccm -d ccm plpgsql
+
+CREATE USER ccm PASSWORD 'ccm';
+CREATE DATABASE ccm WITH ENCODING='UTF8' OWNER=ccm;