Skip to content

Commit b28f3ad

Browse files
committed
If encryption is already initialized we don't need to do it again.
1 parent b1d70f7 commit b28f3ad

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

utils/src/com/cloud/utils/crypt/EncryptionSecretKeyChecker.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ public void check() {
7171
if(encryptionType == null || encryptionType.equals("none")){
7272
return;
7373
}
74+
75+
if (s_useEncryption) {
76+
s_logger.warn("Encryption already enabled, is check() called twice?");
77+
return;
78+
}
7479

7580
s_encryptor.setAlgorithm("PBEWithMD5AndDES");
7681
String secretKey = null;

0 commit comments

Comments
 (0)