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/4.5 to 6c5cf04
Date Wed, 08 Apr 2015 09:05:27 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.5 272dab159 -> 6c5cf04d6


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

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/6c5cf04d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6c5cf04d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6c5cf04d

Branch: refs/heads/4.5
Commit: 6c5cf04d6242cd23cc1e7ea982529df9f27fcb1c
Parents: 272dab1
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:35:17 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/6c5cf04d/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