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-6641] Making EcdhAesWrapKeyEncryptionAlgorithm constructors to accept Content algo as recommended by Colm
Date Thu, 15 Oct 2015 09:51:23 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 2cd0081cf -> 779acfaa4


[CXF-6641] Making EcdhAesWrapKeyEncryptionAlgorithm constructors to accept Content algo as
recommended by Colm


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

Branch: refs/heads/3.0.x-fixes
Commit: 779acfaa4e067a72497032509fb7ec3653147346
Parents: 2cd0081
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Thu Oct 15 10:50:12 2015 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Thu Oct 15 10:51:03 2015 +0100

----------------------------------------------------------------------
 .../jwe/EcdhAesWrapKeyEncryptionAlgorithm.java     | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/779acfaa/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/EcdhAesWrapKeyEncryptionAlgorithm.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/EcdhAesWrapKeyEncryptionAlgorithm.java
b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/EcdhAesWrapKeyEncryptionAlgorithm.java
index 9ad7ac9..6ebf791 100644
--- a/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/EcdhAesWrapKeyEncryptionAlgorithm.java
+++ b/rt/rs/security/jose/jose-core/src/main/java/org/apache/cxf/rs/security/jose/jwe/EcdhAesWrapKeyEncryptionAlgorithm.java
@@ -42,24 +42,31 @@ public class EcdhAesWrapKeyEncryptionAlgorithm implements KeyEncryptionProvider
     
     public EcdhAesWrapKeyEncryptionAlgorithm(ECPublicKey peerPublicKey,
                                              KeyAlgorithm keyAlgo) {
-        //TODO: figure out the curve *name* given ECPublicKey
-        this(peerPublicKey, JsonWebKey.EC_CURVE_P256, null, null, keyAlgo);
+        this(peerPublicKey, JsonWebKey.EC_CURVE_P256, keyAlgo);
     }
     public EcdhAesWrapKeyEncryptionAlgorithm(ECPublicKey peerPublicKey,
                                              String curve,
                                              KeyAlgorithm keyAlgo) {
         
-        this(peerPublicKey, curve, null, null, keyAlgo);
+        this(peerPublicKey, curve, null, null, keyAlgo, ContentAlgorithm.A128GCM);
+    }
+    public EcdhAesWrapKeyEncryptionAlgorithm(ECPublicKey peerPublicKey,
+                                             String curve,
+                                             KeyAlgorithm keyAlgo,
+                                             ContentAlgorithm ctAlgo) {
+        
+        this(peerPublicKey, curve, null, null, keyAlgo, ctAlgo);
     }
     public EcdhAesWrapKeyEncryptionAlgorithm(ECPublicKey peerPublicKey,
                                              String curve,
                                              String apuString,
                                              String apvString,
-                                             KeyAlgorithm keyAlgo) {
+                                             KeyAlgorithm keyAlgo,
+                                             ContentAlgorithm ctAlgo) {
         
         this.keyAlgo = keyAlgo;
         helper = new EcdhHelper(peerPublicKey, curve, apuString, apvString, 
-                                ContentAlgorithm.A128GCM.getJwaName());
+                                ctAlgo.getJwaName());
     }
     
     @Override


Mime
View raw message