mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-126245 Master Password: IllegalState exception while creating a new data source if master password was not set
This commit is contained in:
+3
-2
@@ -19,6 +19,7 @@ import javax.crypto.Cipher;
|
||||
import javax.crypto.spec.IvParameterSpec;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.security.GeneralSecurityException;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
|
||||
@@ -120,8 +121,8 @@ public class EncryptionUtil {
|
||||
c.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(password, SECRET_KEY_ALGORITHM), CBC_SALT_KEY);
|
||||
return c.doFinal(rawKey);
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new IllegalStateException(ENCRYPT_KEY_ALGORITHM + " is not available", e);
|
||||
catch (GeneralSecurityException e) {
|
||||
throw new IllegalStateException(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -211,8 +211,8 @@ public class MasterKeyPasswordSafe extends BasePasswordSafeProvider {
|
||||
}
|
||||
else {
|
||||
MasterPasswordDialog.askPassword(project, MasterKeyPasswordSafe.this, requestor);
|
||||
result.set(key.get().get());
|
||||
}
|
||||
result.set(key.get().get());
|
||||
}
|
||||
catch (PasswordSafeException e) {
|
||||
ex.set(e);
|
||||
|
||||
Reference in New Issue
Block a user