cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Minor updates to the JOSE code
Date Tue, 03 Mar 2015 22:24:58 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 3fb174a9f -> d2fae2a24


Minor updates to the JOSE code


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

Branch: refs/heads/master
Commit: d2fae2a24e2ec7f9766258ee0f77d477929b017a
Parents: 3fb174a
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Tue Mar 3 22:24:26 2015 +0000
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Tue Mar 3 22:24:26 2015 +0000

----------------------------------------------------------------------
 .../cxf/jaxrs/provider/json/JsonMapObjectReaderWriter.java    | 7 +++++++
 .../apache/cxf/rs/security/jose/jaxrs/KeyManagementUtils.java | 4 ++++
 .../java/org/apache/cxf/rs/security/jose/jws/JwsUtils.java    | 3 +++
 3 files changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/d2fae2a2/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JsonMapObjectReaderWriter.java
----------------------------------------------------------------------
diff --git a/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JsonMapObjectReaderWriter.java
b/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JsonMapObjectReaderWriter.java
index c10eaeb..ca8741f 100644
--- a/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JsonMapObjectReaderWriter.java
+++ b/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JsonMapObjectReaderWriter.java
@@ -35,6 +35,13 @@ import org.apache.cxf.common.util.StringUtils;
 public class JsonMapObjectReaderWriter {
     private boolean format;
     
+    public JsonMapObjectReaderWriter() {
+        
+    }
+    public JsonMapObjectReaderWriter(boolean format) {
+        this.format = format;
+    }
+    
     public String toJson(JsonMapObject obj) {
         return toJson(obj.asMap());
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/d2fae2a2/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/KeyManagementUtils.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/KeyManagementUtils.java
b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/KeyManagementUtils.java
index a798dec..a246a14 100644
--- a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/KeyManagementUtils.java
+++ b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/KeyManagementUtils.java
@@ -243,6 +243,10 @@ public final class KeyManagementUtils {
             return null;
         }
     }
+    public static X509Certificate[] toX509CertificateChainArray(List<String> base64EncodedChain)
{
+        List<X509Certificate> chain = toX509CertificateChain(base64EncodedChain);
+        return chain == null ? null : chain.toArray(new X509Certificate[]{});
+    }
     public static String getKeyAlgorithm(Message m, Properties props, String propName, String
defaultAlg) {
         String algo = props.getProperty(propName);
         if (algo == null && PropertyUtils.isTrue(m.getContextualProperty(RSSEC_DEFAULT_ALGORITHMS)))
{

http://git-wip-us.apache.org/repos/asf/cxf/blob/d2fae2a2/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsUtils.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsUtils.java
b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsUtils.java
index bca768a..0727cc6 100644
--- a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsUtils.java
+++ b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsUtils.java
@@ -119,6 +119,9 @@ public final class JwsUtils {
         }
         return theVerifier;
     }
+    public static JwsSignatureVerifier getRSAKeySignatureVerifier(X509Certificate cert, String
algo) {
+        return getRSAKeySignatureVerifier((RSAPublicKey)cert.getPublicKey(), algo);
+    }
     public static JwsSignatureVerifier getRSAKeySignatureVerifier(RSAPublicKey key, String
algo) {
         return new PublicKeyJwsSignatureVerifier(key, SignatureAlgorithm.getAlgorithm(algo));
     }


Mime
View raw message