mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-8372: Encrypt key column when saving key in keystore table
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
272dab1596
commit
6c5cf04d62
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user