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:53:07 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 6f53b39b4 -> 926b49a9b


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

Branch: refs/heads/3.0.x-fixes
Commit: 926b49a9b805756a3175bc0840a24ea8dbddbc4d
Parents: 6f53b39
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:52:51 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/926b49a9/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 b17f7d3..42c6aae 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
@@ -50,6 +50,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 {
@@ -483,6 +484,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