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

2015-10-15 Thread sergeyb
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 
Authored: Thu Oct 15 10:50:12 2015 +0100
Committer: Sergey Beryozkin 
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



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

2015-10-15 Thread sergeyb
Repository: cxf
Updated Branches:
  refs/heads/master c5c21d5b6 -> c17f40d5a


[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/c17f40d5
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/c17f40d5
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/c17f40d5

Branch: refs/heads/master
Commit: c17f40d5a58c71fa3f0eccae5eb1ca16b8b9f23a
Parents: c5c21d5
Author: Sergey Beryozkin 
Authored: Thu Oct 15 10:50:12 2015 +0100
Committer: Sergey Beryozkin 
Committed: Thu Oct 15 10:50:12 2015 +0100

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/c17f40d5/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