cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Set key use to 'sign' in a JWK created from a signing public key loaded from JKS
Date Wed, 16 Dec 2015 16:52:16 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes e13ee941d -> 543e08c7f


Set key use to 'sign' in a JWK created from a signing public key loaded from JKS


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

Branch: refs/heads/3.1.x-fixes
Commit: 543e08c7f74b35b6eae07d5e5afde32c33bc5f2a
Parents: e13ee94
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Wed Dec 16 16:51:01 2015 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Wed Dec 16 16:51:58 2015 +0000

----------------------------------------------------------------------
 .../main/java/org/apache/cxf/rs/security/jose/jws/JwsUtils.java    | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/543e08c7/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsUtils.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsUtils.java
b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsUtils.java
index cc03efd..df21aab 100644
--- a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsUtils.java
+++ b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsUtils.java
@@ -49,6 +49,7 @@ import org.apache.cxf.rs.security.jose.jwk.JsonWebKeys;
 import org.apache.cxf.rs.security.jose.jwk.JwkUtils;
 import org.apache.cxf.rs.security.jose.jwk.KeyOperation;
 import org.apache.cxf.rs.security.jose.jwk.KeyType;
+import org.apache.cxf.rs.security.jose.jwk.PublicKeyUse;
 import org.apache.cxf.rt.security.crypto.MessageDigestUtils;
 
 public final class JwsUtils {
@@ -526,6 +527,7 @@ public final class JwsUtils {
             //TODO: consider loading all the public keys in the store
             PublicKey key = KeyManagementUtils.loadPublicKey(m, props);
             JsonWebKey jwk = JwkUtils.fromPublicKey(key, props, JoseConstants.RSSEC_SIGNATURE_ALGORITHM);
+            jwk.setPublicKeyUse(PublicKeyUse.SIGN);
             return new JsonWebKeys(jwk);
         }
     }


Mime
View raw message