Return-Path: Delivered-To: apmail-incubator-abdera-commits-archive@locus.apache.org Received: (qmail 54876 invoked from network); 18 Sep 2007 22:53:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Sep 2007 22:53:26 -0000 Received: (qmail 52680 invoked by uid 500); 18 Sep 2007 22:53:18 -0000 Delivered-To: apmail-incubator-abdera-commits-archive@incubator.apache.org Received: (qmail 52663 invoked by uid 500); 18 Sep 2007 22:53:18 -0000 Mailing-List: contact abdera-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: abdera-dev@incubator.apache.org Delivered-To: mailing list abdera-commits@incubator.apache.org Received: (qmail 52654 invoked by uid 99); 18 Sep 2007 22:53:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Sep 2007 15:53:18 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Sep 2007 22:55:20 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7D9BF1A9832; Tue, 18 Sep 2007 15:53:02 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r577094 - in /incubator/abdera/java/branches/0.3.0-incubating: build/ examples/src/main/java/org/apache/abdera/examples/security/ security/src/main/java/org/apache/abdera/security/util/servlet/ security/src/test/java/org/apache/abdera/test/... Date: Tue, 18 Sep 2007 22:53:01 -0000 To: abdera-commits@incubator.apache.org From: jmsnell@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20070918225302.7D9BF1A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jmsnell Date: Tue Sep 18 15:53:00 2007 New Revision: 577094 URL: http://svn.apache.org/viewvc?rev=577094&view=rev Log: Remove the bouncy castle dependencies. It will still be downloaded and used during the build for testing, but it is no longer distributed with the zip. Removed: incubator/abdera/java/branches/0.3.0-incubating/security/src/main/java/org/apache/abdera/security/util/servlet/BCEncryptedRequestFilter.java incubator/abdera/java/branches/0.3.0-incubating/security/src/main/java/org/apache/abdera/security/util/servlet/BCEncryptedResponseFilter.java Modified: incubator/abdera/java/branches/0.3.0-incubating/build/build.xml incubator/abdera/java/branches/0.3.0-incubating/examples/src/main/java/org/apache/abdera/examples/security/DHEnc.java incubator/abdera/java/branches/0.3.0-incubating/examples/src/main/java/org/apache/abdera/examples/security/Enc.java incubator/abdera/java/branches/0.3.0-incubating/security/src/main/java/org/apache/abdera/security/util/servlet/AESEncryptedResponseFilter.java incubator/abdera/java/branches/0.3.0-incubating/security/src/main/java/org/apache/abdera/security/util/servlet/DHEncryptedRequestFilter.java incubator/abdera/java/branches/0.3.0-incubating/security/src/main/java/org/apache/abdera/security/util/servlet/DHEncryptedResponseFilter.java incubator/abdera/java/branches/0.3.0-incubating/security/src/test/java/org/apache/abdera/test/security/EncryptionTest.java Modified: incubator/abdera/java/branches/0.3.0-incubating/build/build.xml URL: http://svn.apache.org/viewvc/incubator/abdera/java/branches/0.3.0-incubating/build/build.xml?rev=577094&r1=577093&r2=577094&view=diff ============================================================================== --- incubator/abdera/java/branches/0.3.0-incubating/build/build.xml (original) +++ incubator/abdera/java/branches/0.3.0-incubating/build/build.xml Tue Sep 18 15:53:00 2007 @@ -458,6 +458,8 @@ + + @@ -489,6 +491,8 @@ + + Modified: incubator/abdera/java/branches/0.3.0-incubating/examples/src/main/java/org/apache/abdera/examples/security/DHEnc.java URL: http://svn.apache.org/viewvc/incubator/abdera/java/branches/0.3.0-incubating/examples/src/main/java/org/apache/abdera/examples/security/DHEnc.java?rev=577094&r1=577093&r2=577094&view=diff ============================================================================== --- incubator/abdera/java/branches/0.3.0-incubating/examples/src/main/java/org/apache/abdera/examples/security/DHEnc.java (original) +++ incubator/abdera/java/branches/0.3.0-incubating/examples/src/main/java/org/apache/abdera/examples/security/DHEnc.java Tue Sep 18 15:53:00 2007 @@ -17,6 +17,7 @@ */ package org.apache.abdera.examples.security; +import java.security.Provider; import java.security.Security; import org.apache.abdera.Abdera; @@ -33,16 +34,20 @@ @SuppressWarnings("unchecked") public static void main(String[] args) throws Exception { - // Prepare the crypto provider + Abdera abdera = new Abdera(); + try { - Class.forName("org.bouncycastle.LICENSE"); - Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); + String jce = abdera.getConfiguration().getConfigurationOption( + "jce.provider", + "org.bouncycastle.jce.provider.BouncyCastleProvider"); + Class provider = Class.forName(jce); + Provider p = (Provider)provider.newInstance(); + Security.addProvider(p); } catch (Exception e) { - throw new RuntimeException("The Bouncy Castle JCE Provider is not available"); + // The Configured JCE Provider is not available... try to proceed anyway } // Create the entry to encrypt - Abdera abdera = new Abdera(); AbderaSecurity absec = new AbderaSecurity(abdera); Factory factory = abdera.getFactory(); Modified: incubator/abdera/java/branches/0.3.0-incubating/examples/src/main/java/org/apache/abdera/examples/security/Enc.java URL: http://svn.apache.org/viewvc/incubator/abdera/java/branches/0.3.0-incubating/examples/src/main/java/org/apache/abdera/examples/security/Enc.java?rev=577094&r1=577093&r2=577094&view=diff ============================================================================== --- incubator/abdera/java/branches/0.3.0-incubating/examples/src/main/java/org/apache/abdera/examples/security/Enc.java (original) +++ incubator/abdera/java/branches/0.3.0-incubating/examples/src/main/java/org/apache/abdera/examples/security/Enc.java Tue Sep 18 15:53:00 2007 @@ -17,6 +17,7 @@ */ package org.apache.abdera.examples.security; +import java.security.Provider; import java.security.Security; import javax.crypto.KeyGenerator; @@ -35,12 +36,17 @@ @SuppressWarnings("unchecked") public static void main(String[] args) throws Exception { - // Prepare the crypto provider + Abdera abdera = new Abdera(); + try { - Class.forName("org.bouncycastle.LICENSE"); - Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); + String jce = abdera.getConfiguration().getConfigurationOption( + "jce.provider", + "org.bouncycastle.jce.provider.BouncyCastleProvider"); + Class provider = Class.forName(jce); + Provider p = (Provider)provider.newInstance(); + Security.addProvider(p); } catch (Exception e) { - throw new RuntimeException("The Bouncy Castle JCE Provider is not available"); + // The Configured JCE Provider is not available... try to proceed anyway } // Generate Encryption Key @@ -51,7 +57,6 @@ SecretKey key = keyGenerator.generateKey(); // Create the entry to encrypt - Abdera abdera = new Abdera(); AbderaSecurity absec = new AbderaSecurity(abdera); Factory factory = abdera.getFactory(); Modified: incubator/abdera/java/branches/0.3.0-incubating/security/src/main/java/org/apache/abdera/security/util/servlet/AESEncryptedResponseFilter.java URL: http://svn.apache.org/viewvc/incubator/abdera/java/branches/0.3.0-incubating/security/src/main/java/org/apache/abdera/security/util/servlet/AESEncryptedResponseFilter.java?rev=577094&r1=577093&r2=577094&view=diff ============================================================================== --- incubator/abdera/java/branches/0.3.0-incubating/security/src/main/java/org/apache/abdera/security/util/servlet/AESEncryptedResponseFilter.java (original) +++ incubator/abdera/java/branches/0.3.0-incubating/security/src/main/java/org/apache/abdera/security/util/servlet/AESEncryptedResponseFilter.java Tue Sep 18 15:53:00 2007 @@ -43,7 +43,7 @@ * */ public class AESEncryptedResponseFilter - extends BCEncryptedResponseFilter { + extends AbstractEncryptedResponseFilter { public static final String PUBLICKEY = "X-PublicKey"; Modified: incubator/abdera/java/branches/0.3.0-incubating/security/src/main/java/org/apache/abdera/security/util/servlet/DHEncryptedRequestFilter.java URL: http://svn.apache.org/viewvc/incubator/abdera/java/branches/0.3.0-incubating/security/src/main/java/org/apache/abdera/security/util/servlet/DHEncryptedRequestFilter.java?rev=577094&r1=577093&r2=577094&view=diff ============================================================================== --- incubator/abdera/java/branches/0.3.0-incubating/security/src/main/java/org/apache/abdera/security/util/servlet/DHEncryptedRequestFilter.java (original) +++ incubator/abdera/java/branches/0.3.0-incubating/security/src/main/java/org/apache/abdera/security/util/servlet/DHEncryptedRequestFilter.java Tue Sep 18 15:53:00 2007 @@ -38,7 +38,7 @@ * Note: this is currently untested. */ public class DHEncryptedRequestFilter - extends BCEncryptedRequestFilter { + extends AbstractEncryptedRequestFilter { @Override public void init(FilterConfig config) throws ServletException { Modified: incubator/abdera/java/branches/0.3.0-incubating/security/src/main/java/org/apache/abdera/security/util/servlet/DHEncryptedResponseFilter.java URL: http://svn.apache.org/viewvc/incubator/abdera/java/branches/0.3.0-incubating/security/src/main/java/org/apache/abdera/security/util/servlet/DHEncryptedResponseFilter.java?rev=577094&r1=577093&r2=577094&view=diff ============================================================================== --- incubator/abdera/java/branches/0.3.0-incubating/security/src/main/java/org/apache/abdera/security/util/servlet/DHEncryptedResponseFilter.java (original) +++ incubator/abdera/java/branches/0.3.0-incubating/security/src/main/java/org/apache/abdera/security/util/servlet/DHEncryptedResponseFilter.java Tue Sep 18 15:53:00 2007 @@ -69,7 +69,7 @@ * */ public class DHEncryptedResponseFilter - extends BCEncryptedResponseFilter { + extends AbstractEncryptedResponseFilter { protected boolean doEncryption(ServletRequest request, Object arg) { return arg != null; Modified: incubator/abdera/java/branches/0.3.0-incubating/security/src/test/java/org/apache/abdera/test/security/EncryptionTest.java URL: http://svn.apache.org/viewvc/incubator/abdera/java/branches/0.3.0-incubating/security/src/test/java/org/apache/abdera/test/security/EncryptionTest.java?rev=577094&r1=577093&r2=577094&view=diff ============================================================================== --- incubator/abdera/java/branches/0.3.0-incubating/security/src/test/java/org/apache/abdera/test/security/EncryptionTest.java (original) +++ incubator/abdera/java/branches/0.3.0-incubating/security/src/test/java/org/apache/abdera/test/security/EncryptionTest.java Tue Sep 18 15:53:00 2007 @@ -17,6 +17,9 @@ */ package org.apache.abdera.test.security; +import java.security.Provider; +import java.security.Security; + import javax.crypto.KeyGenerator; import javax.crypto.SecretKey; import javax.xml.namespace.QName; @@ -39,10 +42,17 @@ @SuppressWarnings("unchecked") public static void testEncryption() throws Exception { + Abdera abdera = new Abdera(); + try { - Class.forName("org.bouncycastle.LICENSE"); + String jce = abdera.getConfiguration().getConfigurationOption( + "jce.provider", + "org.bouncycastle.jce.provider.BouncyCastleProvider"); + Class provider = Class.forName(jce); + Provider p = (Provider)provider.newInstance(); + Security.addProvider(p); } catch (Exception e) { - EncryptionTest.fail("The Bouncy Castle JCE Provider is not available"); + // The Configured JCE Provider is not available... try to proceed anyway } // Generate Encryption Key @@ -53,7 +63,6 @@ SecretKey key = keyGenerator.generateKey(); // Create the entry to encrypt - Abdera abdera = new Abdera(); AbderaSecurity absec = new AbderaSecurity(abdera); Factory factory = abdera.getFactory();