abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r474510 - /incubator/abdera/java/trunk/security/src/test/java/org/apache/abdera/test/security/TestSuite.java
Date Mon, 13 Nov 2006 20:52:08 GMT
Author: jmsnell
Date: Mon Nov 13 12:52:07 2006
New Revision: 474510

URL: http://svn.apache.org/viewvc?view=rev&rev=474510
Log:
Need to init the crypto provider in a way that doesn't bind us to any particular provider
at compile-time

Modified:
    incubator/abdera/java/trunk/security/src/test/java/org/apache/abdera/test/security/TestSuite.java

Modified: incubator/abdera/java/trunk/security/src/test/java/org/apache/abdera/test/security/TestSuite.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/security/src/test/java/org/apache/abdera/test/security/TestSuite.java?view=diff&rev=474510&r1=474509&r2=474510
==============================================================================
--- incubator/abdera/java/trunk/security/src/test/java/org/apache/abdera/test/security/TestSuite.java
(original)
+++ incubator/abdera/java/trunk/security/src/test/java/org/apache/abdera/test/security/TestSuite.java
Mon Nov 13 12:52:07 2006
@@ -17,9 +17,15 @@
 */
 package org.apache.abdera.test.security;
 
+import java.security.Provider;
+import java.security.Security;
+
 public class TestSuite extends junit.framework.TestSuite {
 
-  public static void main(String[] args) {
+  public static void main(String[] args) throws Exception {
+    
+    Security.addProvider(getProvider(args[0]));
+    
     junit.textui.TestRunner.run(new TestSuite());
   }  
   
@@ -29,4 +35,7 @@
     addTestSuite(DSigThirdPartyVerifyTest.class);
   }
   
+  private static Provider getProvider(String provider) throws Exception {
+    return (Provider) Class.forName(provider).newInstance();
+  }
 }



Mime
View raw message