From b1d70f7fe340302f180843c01ee6674166d03ee1 Mon Sep 17 00:00:00 2001 From: Hugo Trippaers Date: Wed, 6 Feb 2013 15:53:50 +0100 Subject: [PATCH] Before any database calls are made we need to make sure that encryption is properly initialized if we have an encrypted db.properties. --- utils/src/com/cloud/utils/db/Transaction.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/utils/src/com/cloud/utils/db/Transaction.java b/utils/src/com/cloud/utils/db/Transaction.java index d596de23016..c1f157ed7a2 100755 --- a/utils/src/com/cloud/utils/db/Transaction.java +++ b/utils/src/com/cloud/utils/db/Transaction.java @@ -93,6 +93,12 @@ public class Transaction { } catch (Exception e) { s_logger.error("Unable to register mbean for transaction", e); } + + /* FIXME: We need a better solution for this + * Initialize encryption if we need it for db.properties + */ + EncryptionSecretKeyChecker enc = new EncryptionSecretKeyChecker(); + enc.check(); } private final LinkedList _stack;