Alon Bar-Lev has posted comments on this change.

Change subject: pki: introduce the EngineEncryptionUtils
......................................................................


Patch Set 1: (4 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/provider/ExternalTrustStoreInitializer.java
Line 17:     private static final String FILE_URL_PREFIX = "file://";
Line 18: 
Line 19:     private static String getTrustStorePath() {
Line 20:         File varDir = EngineLocalConfig.getInstance().getVarDir();
Line 21:         return varDir + "/" + "external_truststore";
this is out of the scope of this patch...
Line 22:     }
Line 23: 
Line 24:     public static void init() {
Line 25:         File trustStoreFile = new File(getTrustStorePath());


Line 37:     }
Line 38: 
Line 39:     public static KeyStore getTrustStore() {
Line 40:         try (InputStream in = new 
FileInputStream(getTrustStorePath())) {
Line 41:             // TODO: do not use password of other store
yes we do... this password belongs to the truststore not the external 
truststore, it should not have been used, fixing this is out of this patch 
scope.
Line 42:             String password = 
EngineLocalConfig.getInstance().getPKITrustStorePassword();
Line 43:             KeyStore ks = KeyStore.getInstance("JKS");
Line 44:             ks.load(in, password.toCharArray());
Line 45:             return ks;


....................................................
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/DbFacadeUtils.java
Line 7: import org.ovirt.engine.core.utils.crypt.EngineEncryptionUtils;
Line 8: import org.ovirt.engine.core.utils.log.Log;
Line 9: import org.ovirt.engine.core.utils.log.LogFactory;
Line 10: 
Line 11: public class DbFacadeUtils {
the decryption is somewhat strange... as you can see it returns the encrypted 
content if it fail to decrypt.
Line 12:     private static final Log log = 
LogFactory.getLog(DbFacadeUtils.class);
Line 13: 
Line 14:     public static Date fromDate(Timestamp timestamp) {
Line 15:         if (timestamp == null) {


....................................................
File 
backend/manager/tools/src/main/java/org/ovirt/engine/core/config/entity/helper/PasswordValueHelper.java
Line 27:     }
Line 28: 
Line 29:     String decrypt(String value) throws Exception {
Line 30:         return EngineEncryptionUtils.decrypt(value);
Line 31:     }
I can remove these two functions, but these already existed.

Yair?
Line 32: 
Line 33:     @Override
Line 34:     public String getValue(String value) throws 
GeneralSecurityException {
Line 35:         /*


-- 
To view, visit http://gerrit.ovirt.org/16088
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I10af516c2f35bb853ccae42a03e3ec4b98ce5efb
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Oved Ourfali <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to