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 <[email protected]> Authored: Thu Jul 10 17:45:43 2014 +0200 Committer: Akitoshi Yoshida <[email protected]> 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; }
