You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ay...@apache.org on 2014/07/10 17:47:19 UTC
git commit: [CXF-5869] Temporary file caching using encryption may
get corrupted data
Repository: cxf
Updated Branches:
refs/heads/master 82d49c140 -> f584187d0
[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/f584187d
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/f584187d
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/f584187d
Branch: refs/heads/master
Commit: f584187d09471f28578854e288a7c7d612ea82bc
Parents: 82d49c1
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 17:45:57 2014 +0200
----------------------------------------------------------------------
core/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/f584187d/core/src/main/java/org/apache/cxf/io/CipherPair.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/io/CipherPair.java b/core/src/main/java/org/apache/cxf/io/CipherPair.java
index 0a4b856..8237221 100644
--- a/core/src/main/java/org/apache/cxf/io/CipherPair.java
+++ b/core/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;
}