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-6728] Minor update
Date Tue, 20 Jun 2017 14:12:01 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 998ce1e5d -> 24694c66d


[CXF-6728] Minor update


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

Branch: refs/heads/master
Commit: 24694c66dcb3afdd6011c9f98d4467e490be8171
Parents: 998ce1e
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Tue Jun 20 15:11:49 2017 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Tue Jun 20 15:11:49 2017 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/cxf/rs/security/jose/jwe/JweUtils.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/24694c66/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 f4d5842..ca9192c 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
@@ -714,7 +714,9 @@ public final class JweUtils {
         // "In Step 4, it may not be necessary to compute the point nQ. For example, if h
= 1, then nQ = O is implied
         // by the checks in Steps 2 and 3, because this property holds for all points Q ∈
E"
         // All the NIST curves used here define h = 1.
-        assert peerPublicKey.getParams().getCofactor() == 1;
+        if (peerPublicKey.getParams().getCofactor() != 1) {
+            throw new JweException(JweException.Error.KEY_ENCRYPTION_FAILURE);
+        }
 
         // Finally calculate the derived key
         


Mime
View raw message