cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject [1/2] git commit: [CXF-5869] Temporary file caching using encryption may get corrupted data
Date Thu, 10 Jul 2014 16:58:11 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes d5621a999 -> c651e2671


[CXF-5869] Temporary file caching using encryption may get corrupted data


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

Branch: refs/heads/2.7.x-fixes
Commit: 141e88e6072fe8a85c4d6204719eca1b9d7eb04a
Parents: d5621a9
Author: Akitoshi Yoshida <ay@apache.org>
Authored: Thu Jul 10 17:45:43 2014 +0200
Committer: Akitoshi Yoshida <ay@apache.org>
Committed: Thu Jul 10 18:56:50 2014 +0200

----------------------------------------------------------------------
 api/src/main/java/org/apache/cxf/io/CipherPair.java | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/141e88e6/api/src/main/java/org/apache/cxf/io/CipherPair.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/cxf/io/CipherPair.java b/api/src/main/java/org/apache/cxf/io/CipherPair.java
index 0a4b856..8237221 100644
--- a/api/src/main/java/org/apache/cxf/io/CipherPair.java
+++ b/api/src/main/java/org/apache/cxf/io/CipherPair.java
@@ -32,6 +32,7 @@ import javax.crypto.spec.IvParameterSpec;
  */
 public class CipherPair {
     private String transformation;
+    private Cipher enccipher;
     private Key key;
     private byte[] ivp;
     
@@ -45,7 +46,6 @@ public class CipherPair {
         } else {
             a = transformation;
         }
-        Cipher enccipher = null;
         try {
             KeyGenerator keygen = KeyGenerator.getInstance(a);
             keygen.init(new SecureRandom());
@@ -64,13 +64,6 @@ public class CipherPair {
     }
     
     public Cipher getEncryptor() {
-        Cipher enccipher = null;
-        try {
-            enccipher = Cipher.getInstance(transformation);
-            enccipher.init(Cipher.ENCRYPT_MODE, key);
-        } catch (GeneralSecurityException e) {
-            // ignore
-        }
         return enccipher;
     }
     


Mime
View raw message