cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [3/3] cxf git commit: Fixing merge
Date Mon, 19 Oct 2015 10:23:15 GMT
Fixing merge


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/4a4091e0
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/4a4091e0
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/4a4091e0

Branch: refs/heads/3.0.x-fixes
Commit: 4a4091e0c269e68f8d0a727eae6cd37bdacb58fa
Parents: 1fc4ba5
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Mon Oct 19 11:23:04 2015 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Mon Oct 19 11:23:04 2015 +0100

----------------------------------------------------------------------
 .../jaxrs/security/jwt/JAXRSJweJwsTest.java     |  4 ++++
 .../jaxrs/security/jwt/JAXRSJwsJsonTest.java    |  8 +------
 .../jaxrs/security/jwt/JweJwsAlgorithmTest.java | 25 +++++++++++++++++++-
 3 files changed, 29 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/4a4091e0/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JAXRSJweJwsTest.java
----------------------------------------------------------------------
diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JAXRSJweJwsTest.java
b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JAXRSJweJwsTest.java
index f8e5d2e..f0dd763 100644
--- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JAXRSJweJwsTest.java
+++ b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JAXRSJweJwsTest.java
@@ -47,6 +47,7 @@ import org.apache.cxf.rs.security.jose.jwe.AesWrapKeyEncryptionAlgorithm;
 import org.apache.cxf.rs.security.jose.jws.HmacJwsSignatureProvider;
 import org.apache.cxf.rs.security.jose.jws.JwsSignatureProvider;
 import org.apache.cxf.systest.jaxrs.security.Book;
+import org.apache.cxf.systest.jaxrs.security.SecurityTestUtil;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.bouncycastle.jce.provider.BouncyCastleProvider;
 
@@ -451,6 +452,9 @@ public class JAXRSJweJwsTest extends AbstractBusClientServerTestBase {
     // Test signing and encrypting an XML payload
     @Test
     public void testJweRsaJwsRsaXML() throws Exception {
+        if (SKIP_AES_GCM_TESTS || !SecurityTestUtil.checkUnrestrictedPoliciesInstalled())
{
+            return;
+        }
         String address = "https://localhost:" + PORT + "/jwejwsrsa";
         BookStore bs = createJweJwsBookStore(address, null, null);
         Book book = new Book();

http://git-wip-us.apache.org/repos/asf/cxf/blob/4a4091e0/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JAXRSJwsJsonTest.java
----------------------------------------------------------------------
diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JAXRSJwsJsonTest.java
b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JAXRSJwsJsonTest.java
index 473709d..01eecc9 100644
--- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JAXRSJwsJsonTest.java
+++ b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JAXRSJwsJsonTest.java
@@ -101,16 +101,10 @@ public class JAXRSJwsJsonTest extends AbstractBusClientServerTestBase
{
     }
     @Test
     public void testJweCompactJwsJsonBookBeanHmac() throws Exception {
-<<<<<<< HEAD
-        if (SKIP_AES_GCM_TESTS) {
-            return;
-        }
-=======
-        if (!SecurityTestUtil.checkUnrestrictedPoliciesInstalled()) {
+        if (SKIP_AES_GCM_TESTS || !SecurityTestUtil.checkUnrestrictedPoliciesInstalled())
{
             return;
         }
         
->>>>>>> 4ba52d1... Fixing failing tests with limited security policies
         String address = "https://localhost:" + PORT + "/jwejwsjsonhmac";
         List<?> extraProviders = Arrays.asList(new JacksonJsonProvider(),
                                                new JweWriterInterceptor(),

http://git-wip-us.apache.org/repos/asf/cxf/blob/4a4091e0/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JweJwsAlgorithmTest.java
----------------------------------------------------------------------
diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JweJwsAlgorithmTest.java
b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JweJwsAlgorithmTest.java
index e70545c..62b72b8 100644
--- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JweJwsAlgorithmTest.java
+++ b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JweJwsAlgorithmTest.java
@@ -45,6 +45,12 @@ import org.junit.BeforeClass;
  */
 public class JweJwsAlgorithmTest extends AbstractBusClientServerTestBase {
     public static final String PORT = BookServerAlgorithms.PORT;
+    private static final Boolean SKIP_AES_GCM_TESTS = isJava6();
+    
+    private static boolean isJava6() {
+        String version = System.getProperty("java.version");
+        return 1.6D == Double.parseDouble(version.substring(0, 3));    
+    }
     
     @BeforeClass
     public static void startServers() throws Exception {
@@ -69,6 +75,10 @@ public class JweJwsAlgorithmTest extends AbstractBusClientServerTestBase
{
     @org.junit.Test
     public void testEncryptionProperties() throws Exception {
 
+        if (SKIP_AES_GCM_TESTS) {
+            return;
+        }
+        
         URL busFile = JweJwsAlgorithmTest.class.getResource("client.xml");
 
         List<Object> providers = new ArrayList<Object>();
@@ -95,6 +105,10 @@ public class JweJwsAlgorithmTest extends AbstractBusClientServerTestBase
{
     
     @org.junit.Test
     public void testEncryptionDynamic() throws Exception {
+        
+        if (SKIP_AES_GCM_TESTS) {
+            return;
+        }
 
         URL busFile = JweJwsAlgorithmTest.class.getResource("client.xml");
 
@@ -125,6 +139,10 @@ public class JweJwsAlgorithmTest extends AbstractBusClientServerTestBase
{
 
     @org.junit.Test
     public void testWrongKeyEncryptionAlgorithm() throws Exception {
+        
+        if (SKIP_AES_GCM_TESTS) {
+            return;
+        }
 
         URL busFile = JweJwsAlgorithmTest.class.getResource("client.xml");
 
@@ -151,7 +169,8 @@ public class JweJwsAlgorithmTest extends AbstractBusClientServerTestBase
{
     
     @org.junit.Test
     public void testWrongContentEncryptionAlgorithm() throws Exception {
-        if (!SecurityTestUtil.checkUnrestrictedPoliciesInstalled()) {
+        
+        if (SKIP_AES_GCM_TESTS || !SecurityTestUtil.checkUnrestrictedPoliciesInstalled())
{
             return;
         }
 
@@ -180,6 +199,10 @@ public class JweJwsAlgorithmTest extends AbstractBusClientServerTestBase
{
 
     @org.junit.Test
     public void testBadEncryptingKey() throws Exception {
+        
+        if (SKIP_AES_GCM_TESTS) {
+            return;
+        }
 
         URL busFile = JweJwsAlgorithmTest.class.getResource("client.xml");
 


Mime
View raw message