You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2015/10/20 11:41:54 UTC
cxf git commit: Fixing tests
Repository: cxf
Updated Branches:
refs/heads/3.0.x-fixes 36e471dc3 -> 19c2a9d22
Fixing tests
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/19c2a9d2
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/19c2a9d2
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/19c2a9d2
Branch: refs/heads/3.0.x-fixes
Commit: 19c2a9d22fe557488f86e61fcc4e84260a927fd6
Parents: 36e471d
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Tue Oct 20 10:41:33 2015 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Tue Oct 20 10:41:33 2015 +0100
----------------------------------------------------------------------
.../rs/security/jose/jws/JwsCompactReaderWriterTest.java | 10 ++++++++++
.../cxf/rs/security/jose/jws/JwsJsonConsumerTest.java | 9 +++++++++
2 files changed, 19 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/19c2a9d2/rt/rs/security/jose/jose-core/src/test/java/org/apache/cxf/rs/security/jose/jws/JwsCompactReaderWriterTest.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/jose-core/src/test/java/org/apache/cxf/rs/security/jose/jws/JwsCompactReaderWriterTest.java b/rt/rs/security/jose/jose-core/src/test/java/org/apache/cxf/rs/security/jose/jws/JwsCompactReaderWriterTest.java
index de733c5..7292a52 100644
--- a/rt/rs/security/jose/jose-core/src/test/java/org/apache/cxf/rs/security/jose/jws/JwsCompactReaderWriterTest.java
+++ b/rt/rs/security/jose/jose-core/src/test/java/org/apache/cxf/rs/security/jose/jws/JwsCompactReaderWriterTest.java
@@ -98,6 +98,12 @@ public class JwsCompactReaderWriterTest extends Assert {
"f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU";
private static final String EC_Y_POINT_ENCODED =
"x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0";
+
+ private static boolean isJava6() {
+ String version = System.getProperty("java.version");
+ return 1.6D == Double.parseDouble(version.substring(0, 3));
+ }
+
@Test
public void testWriteJwsSignedByMacSpecExample() throws Exception {
JwsHeaders headers = new JwsHeaders();
@@ -256,6 +262,10 @@ public class JwsCompactReaderWriterTest extends Assert {
@Test
public void testWriteReadJwsSignedByESPrivateKey() throws Exception {
+ if (isJava6()) {
+ return;
+ }
+
JwsHeaders headers = new JwsHeaders();
headers.setSignatureAlgorithm(SignatureAlgorithm.ES256);
JwsCompactProducer jws = initSpecJwtTokenWriter(headers);
http://git-wip-us.apache.org/repos/asf/cxf/blob/19c2a9d2/rt/rs/security/jose/jose-core/src/test/java/org/apache/cxf/rs/security/jose/jws/JwsJsonConsumerTest.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/jose-core/src/test/java/org/apache/cxf/rs/security/jose/jws/JwsJsonConsumerTest.java b/rt/rs/security/jose/jose-core/src/test/java/org/apache/cxf/rs/security/jose/jws/JwsJsonConsumerTest.java
index 0faed8b..a5e35b0 100644
--- a/rt/rs/security/jose/jose-core/src/test/java/org/apache/cxf/rs/security/jose/jws/JwsJsonConsumerTest.java
+++ b/rt/rs/security/jose/jose-core/src/test/java/org/apache/cxf/rs/security/jose/jws/JwsJsonConsumerTest.java
@@ -52,6 +52,11 @@ public class JwsJsonConsumerTest extends Assert {
private static final String KID_OF_THE_FIRST_SIGNER = "2010-12-29";
private static final String KID_OF_THE_SECOND_SIGNER = "e9bc097a-ce51-4036-9562-d2ade882db0d";
+ private static boolean isJava6() {
+ String version = System.getProperty("java.version");
+ return 1.6D == Double.parseDouble(version.substring(0, 3));
+ }
+
@Test
public void testVerifySignedWithProtectedHeaderOnlyUnencodedPayload() {
JwsJsonConsumer consumer =
@@ -64,6 +69,10 @@ public class JwsJsonConsumerTest extends Assert {
@Test
public void testVerifyDualSignedDocument() throws Exception {
+ if (isJava6()) {
+ return;
+ }
+
JwsJsonConsumer consumer = new JwsJsonConsumer(DUAL_SIGNED_DOCUMENT);
JsonWebKeys jwks = readKeySet("jwkPublicJsonConsumerSet.txt");