cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject git commit: updated refs/heads/master to aada8fe
Date Wed, 08 Apr 2015 09:08:47 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 974c56423 -> aada8fe1d


CLOUDSTACK-8372: Encrypt key column when saving key in keystore table

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 6c5cf04d6242cd23cc1e7ea982529df9f27fcb1c)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>


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

Branch: refs/heads/master
Commit: aada8fe1d54a258209147c579e3ca8aa4b72910a
Parents: 974c564
Author: Rohit Yadav <rohit.yadav@shapeblue.com>
Authored: Wed Apr 8 14:29:55 2015 +0530
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Wed Apr 8 14:37:14 2015 +0530

----------------------------------------------------------------------
 .../cloudstack/framework/security/keystore/KeystoreDaoImpl.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/aada8fe1/framework/security/src/org/apache/cloudstack/framework/security/keystore/KeystoreDaoImpl.java
----------------------------------------------------------------------
diff --git a/framework/security/src/org/apache/cloudstack/framework/security/keystore/KeystoreDaoImpl.java
b/framework/security/src/org/apache/cloudstack/framework/security/keystore/KeystoreDaoImpl.java
index b856582..8a8754d 100644
--- a/framework/security/src/org/apache/cloudstack/framework/security/keystore/KeystoreDaoImpl.java
+++ b/framework/security/src/org/apache/cloudstack/framework/security/keystore/KeystoreDaoImpl.java
@@ -25,6 +25,7 @@ import javax.ejb.Local;
 
 import org.springframework.stereotype.Component;
 
+import com.cloud.utils.crypt.DBEncryptionUtil;
 import com.cloud.utils.db.DB;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
@@ -104,10 +105,10 @@ public class KeystoreDaoImpl extends GenericDaoBase<KeystoreVO, Long>
implements
             PreparedStatement pstmt = txn.prepareAutoCloseStatement(sql);
             pstmt.setString(1, name);
             pstmt.setString(2, certificate);
-            pstmt.setString(3, key);
+            pstmt.setString(3, DBEncryptionUtil.encrypt(key));
             pstmt.setString(4, domainSuffix);
             pstmt.setString(5, certificate);
-            pstmt.setString(6, key);
+            pstmt.setString(6, DBEncryptionUtil.encrypt(key));
             pstmt.setString(7, domainSuffix);
 
             pstmt.executeUpdate();


Mime
View raw message