cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Setting JOSE direct algo property to 'dir' as per the spec
Date Wed, 20 Jan 2016 11:50:39 GMT
Repository: cxf
Updated Branches:
  refs/heads/master b0227b307 -> fa76530bb


Setting JOSE direct algo property to 'dir' as per the spec


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

Branch: refs/heads/master
Commit: fa76530bb6563e6c43d4e2bf01b6a24b1a932c3e
Parents: b0227b3
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Wed Jan 20 11:50:21 2016 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Wed Jan 20 11:50:21 2016 +0000

----------------------------------------------------------------------
 .../java/org/apache/cxf/rs/security/jose/jwa/KeyAlgorithm.java   | 2 +-
 .../main/java/org/apache/cxf/rs/security/jose/jwe/JweUtils.java  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/fa76530b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwa/KeyAlgorithm.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwa/KeyAlgorithm.java
b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwa/KeyAlgorithm.java
index 5a89b0d..cff4ab8 100644
--- a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwa/KeyAlgorithm.java
+++ b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwa/KeyAlgorithm.java
@@ -40,7 +40,7 @@ public enum KeyAlgorithm {
     ECDH_ES_A256KW(AlgorithmUtils.ECDH_ES_A256KW_ALGO, "AESWrap", 256),
     ECDH_ES_DIRECT(AlgorithmUtils.ECDH_ES_DIRECT_ALGO, null, -1),
     
-    DIRECT("direct", null, -1);
+    DIRECT("dir", null, -1);
         
     private final String jwaName;
     private final String javaName;

http://git-wip-us.apache.org/repos/asf/cxf/blob/fa76530b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweUtils.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweUtils.java
b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweUtils.java
index ba902f5..d07a746 100644
--- a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweUtils.java
+++ b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweUtils.java
@@ -332,7 +332,7 @@ public final class JweUtils {
         ContentEncryptionProvider ctEncryptionProvider = null;
         if (JoseConstants.HEADER_JSON_WEB_KEY.equals(props.get(JoseConstants.RSSEC_KEY_STORE_TYPE)))
{
             JsonWebKey jwk = JwkUtils.loadJsonWebKey(m, props, KeyOperation.ENCRYPT);
-            if ("direct".equals(keyAlgo.getJwaName())) {
+            if (KeyAlgorithm.DIRECT == keyAlgo) {
                 contentAlgo = getContentEncryptionAlgorithm(m, props, 
                                             ContentAlgorithm.getAlgorithm(jwk.getAlgorithm()),

                                             ContentAlgorithm.A128GCM);
@@ -441,7 +441,7 @@ public final class JweUtils {
                     throw new JweException(JweException.Error.KEY_DECRYPTION_FAILURE);
                 }
                 
-                if ("direct".equals(keyAlgo.getJwaName())) {
+                if (KeyAlgorithm.DIRECT == keyAlgo) {
                     contentAlgo = getContentEncryptionAlgorithm(m, props, 
                                                 ContentAlgorithm.getAlgorithm(jwk.getAlgorithm()),
                                                 ContentAlgorithm.A128GCM);


Mime
View raw message