cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-6725] Removing old and likely never used JWS properties
Date Wed, 01 Mar 2017 12:56:00 GMT
Repository: cxf
Updated Branches:
  refs/heads/master cf6599e91 -> ad200706d


[CXF-6725] Removing old and likely never used JWS properties


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

Branch: refs/heads/master
Commit: ad200706d0ea914987930a64d2f5c14336a0c641
Parents: cf6599e
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Wed Mar 1 12:55:44 2017 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Wed Mar 1 12:55:44 2017 +0000

----------------------------------------------------------------------
 .../rs/security/jose/common/JoseConstants.java  |  6 -----
 .../cxf/rs/security/jose/jws/JwsUtils.java      | 28 +++++++-------------
 2 files changed, 9 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/ad200706/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/JoseConstants.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/JoseConstants.java
b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/JoseConstants.java
index 2f7c512..6d516ef 100644
--- a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/JoseConstants.java
+++ b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/JoseConstants.java
@@ -138,12 +138,6 @@ public final class JoseConstants {
     public static final String RSSEC_EC_CURVE = "rs.security.elliptic.curve";
 
     /**
-     * The OLD signature algorithm identifier. Use RSSEC_SIGNATURE_ALGORITHM instead.
-     */
-    @Deprecated
-    public static final String DEPR_RSSEC_SIGNATURE_ALGORITHM = "rs.security.jws.content.signature.algorithm";
-
-    /**
      * The signature properties file for compact signature creation. If not specified then
it falls back to
      * RSSEC_SIGNATURE_PROPS.
      */

http://git-wip-us.apache.org/repos/asf/cxf/blob/ad200706/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsUtils.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsUtils.java
b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsUtils.java
index 74f5c6f..25f12ba 100644
--- a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsUtils.java
+++ b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsUtils.java
@@ -479,33 +479,23 @@ public final class JwsUtils {
         }
     }
 
-    @SuppressWarnings("deprecation")
     public static SignatureAlgorithm getSignatureAlgorithm(Message m, Properties props,
                                                SignatureAlgorithm algo,
                                                SignatureAlgorithm defaultAlgo) {
         if (algo == null) {
-            // Check for deprecated identifier first
-            String sigAlgo = null;
-            if (props != null) {
-                sigAlgo = props.getProperty(JoseConstants.DEPR_RSSEC_SIGNATURE_ALGORITHM);
-            }
-            if (sigAlgo == null && m != null) {
-                sigAlgo = (String)m.getContextualProperty(JoseConstants.DEPR_RSSEC_SIGNATURE_ALGORITHM);
-            }
-            if (sigAlgo != null) {
-                return SignatureAlgorithm.getAlgorithm(sigAlgo);
-            }
-
-            // Otherwise check newer identifier
-            if (props != null) {
-                return getSignatureAlgorithm(props, defaultAlgo);
-            }
+            algo = getSignatureAlgorithm(m, props, defaultAlgo);
         }
         return algo;
     }
     public static SignatureAlgorithm getSignatureAlgorithm(Properties props,
-                                               SignatureAlgorithm defaultAlgo) {
-        String algo = KeyManagementUtils.getKeyAlgorithm(PhaseInterceptorChain.getCurrentMessage(),
+                                                           SignatureAlgorithm defaultAlgo)
{
+        return getSignatureAlgorithm(PhaseInterceptorChain.getCurrentMessage(),
+                                     props, defaultAlgo);
+    }
+    public static SignatureAlgorithm getSignatureAlgorithm(Message m,
+                                                           Properties props,
+                                                           SignatureAlgorithm defaultAlgo)
{
+        String algo = KeyManagementUtils.getKeyAlgorithm(m,
                                                   props,
                                                   JoseConstants.RSSEC_SIGNATURE_ALGORITHM,
                                                   defaultAlgo == null ? null : defaultAlgo.getJwaName());


Mime
View raw message