incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject [18/23] git commit: refs/heads/vim51_win8 - If encryption is already initialized we don't need to do it again.
Date Wed, 06 Feb 2013 23:28:06 GMT
If encryption is already initialized we don't need to do it again.

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

Branch: refs/heads/vim51_win8
Commit: b28f3addfc63b6a2bf9e76b0230f716e9ef7f51c
Parents: b1d70f7
Author: Hugo Trippaers <htrippaers@schubergphilis.com>
Authored: Wed Feb 6 16:49:12 2013 +0100
Committer: Hugo Trippaers <htrippaers@schubergphilis.com>
Committed: Wed Feb 6 16:49:12 2013 +0100

----------------------------------------------------------------------
 .../utils/crypt/EncryptionSecretKeyChecker.java    |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/b28f3add/utils/src/com/cloud/utils/crypt/EncryptionSecretKeyChecker.java
----------------------------------------------------------------------
diff --git a/utils/src/com/cloud/utils/crypt/EncryptionSecretKeyChecker.java b/utils/src/com/cloud/utils/crypt/EncryptionSecretKeyChecker.java
index c717a3a..5ffa14f 100755
--- a/utils/src/com/cloud/utils/crypt/EncryptionSecretKeyChecker.java
+++ b/utils/src/com/cloud/utils/crypt/EncryptionSecretKeyChecker.java
@@ -71,6 +71,11 @@ public class EncryptionSecretKeyChecker extends AdapterBase implements
SystemInt
             if(encryptionType == null || encryptionType.equals("none")){
                 return;
             }
+            
+            if (s_useEncryption) {
+            	s_logger.warn("Encryption already enabled, is check() called twice?");
+            	return;
+            }
 
             s_encryptor.setAlgorithm("PBEWithMD5AndDES");
             String secretKey = null;


Mime
View raw message