cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [2/3] cxf git commit: CXF-7294 - Incorrect header parameter for Jose ECDH KA public key
Date Wed, 22 Mar 2017 13:12:17 GMT
CXF-7294 - Incorrect header parameter for Jose ECDH KA public key

# Conflicts:
#	rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/EcdhDirectKeyJweEncryption.java


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

Branch: refs/heads/3.1.x-fixes
Commit: 7d810eef57861e0ea2381803d31ef0673b980f27
Parents: c627cb1
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Wed Mar 22 13:10:27 2017 +0000
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Wed Mar 22 13:11:23 2017 +0000

----------------------------------------------------------------------
 .../cxf/rs/security/jose/jwe/EcdhDirectKeyJweDecryption.java   | 2 +-
 .../cxf/rs/security/jose/jwe/EcdhDirectKeyJweEncryption.java   | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/7d810eef/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/EcdhDirectKeyJweDecryption.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/EcdhDirectKeyJweDecryption.java
b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/EcdhDirectKeyJweDecryption.java
index 85485e0..13a0107 100644
--- a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/EcdhDirectKeyJweDecryption.java
+++ b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/EcdhDirectKeyJweDecryption.java
@@ -34,7 +34,7 @@ public class EcdhDirectKeyJweDecryption extends JweDecryption {
     protected static byte[] getDecryptedContentEncryptionKeyFromHeaders(JweHeaders headers,
                                                                         ECPrivateKey privateKey)
{
         ContentAlgorithm jwtAlgo = headers.getContentEncryptionAlgorithm();
-        JsonWebKey publicJwk = headers.getJsonWebKey("epv");
+        JsonWebKey publicJwk = headers.getJsonWebKey("epk");
         String apuHeader = (String)headers.getHeader("apu");
         byte[] apuBytes = apuHeader == null ? null : JoseUtils.decode(apuHeader);
         String apvHeader = (String)headers.getHeader("apv");

http://git-wip-us.apache.org/repos/asf/cxf/blob/7d810eef/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/EcdhDirectKeyJweEncryption.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/EcdhDirectKeyJweEncryption.java
b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/EcdhDirectKeyJweEncryption.java
index 39b6928..ad7eb02 100644
--- a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/EcdhDirectKeyJweEncryption.java
+++ b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/EcdhDirectKeyJweEncryption.java
@@ -95,9 +95,15 @@ public class EcdhDirectKeyJweEncryption extends JweEncryption {
         
             headers.setHeader("apu", Base64UrlUtility.encode(apuBytes));
             headers.setHeader("apv", Base64UrlUtility.encode(apvBytes));
+<<<<<<< HEAD
             headers.setJsonWebKey("epv", JwkUtils.fromECPublicKey(publicKey, ecurve));
             
             return JweUtils.getECDHKey(privateKey, peerPublicKey, apuBytes, apvBytes, 
+=======
+            headers.setJsonWebKey("epk", JwkUtils.fromECPublicKey(publicKey, ecurve));
+
+            return JweUtils.getECDHKey(privateKey, peerPublicKey, apuBytes, apvBytes,
+>>>>>>> a2efc18... CXF-7294 - Incorrect header parameter for Jose ECDH
KA public key
                                        jwtAlgo.getJwaName(), jwtAlgo.getKeySizeBits());
             
         }


Mime
View raw message