cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject git commit: CXF-5311: Removing the reflective Cipher.updateAAD call on the trunk
Date Thu, 24 Jul 2014 13:37:56 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 7134c4858 -> 08d98fbb1


CXF-5311: Removing the reflective Cipher.updateAAD call on the trunk


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

Branch: refs/heads/master
Commit: 08d98fbb13440de2da3b19915d8dfe21531cb284
Parents: 7134c48
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Thu Jul 24 16:37:40 2014 +0300
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Thu Jul 24 16:37:40 2014 +0300

----------------------------------------------------------------------
 .../rs/security/oauth2/utils/crypto/CryptoUtils.java   | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/08d98fbb/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/crypto/CryptoUtils.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/crypto/CryptoUtils.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/crypto/CryptoUtils.java
index 1e5a84f..3edc75d 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/crypto/CryptoUtils.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/crypto/CryptoUtils.java
@@ -21,7 +21,6 @@ package org.apache.cxf.rs.security.oauth2.utils.crypto;
 
 import java.io.InputStream;
 import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
 import java.math.BigInteger;
 import java.security.Key;
 import java.security.KeyFactory;
@@ -46,7 +45,6 @@ import java.security.spec.ECPublicKeySpec;
 import java.security.spec.RSAPrivateKeySpec;
 import java.security.spec.RSAPublicKeySpec;
 import java.util.Properties;
-import java.util.logging.Logger;
 
 import javax.crypto.Cipher;
 import javax.crypto.KeyGenerator;
@@ -56,7 +54,6 @@ import javax.crypto.spec.SecretKeySpec;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.common.classloader.ClassLoaderUtils;
-import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.CompressionUtils;
 import org.apache.cxf.helpers.IOUtils;
 import org.apache.cxf.jaxrs.utils.ResourceUtils;
@@ -78,8 +75,6 @@ public final class CryptoUtils {
     public static final String RSSEC_PRINCIPAL_NAME = "rs.security.principal.name";
     public static final String RSSEC_SIG_KEY_PSWD_PROVIDER = "rs.security.signature.key.password.provider";
     public static final String RSSEC_DECRYPT_KEY_PSWD_PROVIDER = "rs.security.decryption.key.password.provider";
-        
-    private static final Logger LOG = LogUtils.getL7dLogger(CryptoUtils.class);
     
     private CryptoUtils() {
     }
@@ -649,13 +644,7 @@ public final class CryptoUtils {
                 }
             }
             if (keyProps != null && keyProps.getAdditionalData() != null) {
-                // TODO: call updateAAD directly after switching to Java7
-                try {
-                    Method m = Cipher.class.getMethod("updateAAD", new Class[]{byte[].class});
-                    m.invoke(c, new Object[]{keyProps.getAdditionalData()});
-                } catch (NoSuchMethodException ex) {
-                    LOG.fine(ex.getMessage());
-                }
+                c.updateAAD(keyProps.getAdditionalData());
             }
             return c;
         } catch (Exception ex) {


Mime
View raw message