diff --git a/platform/platform-impl/src/com/intellij/ide/passwordSafe/impl/providers/masterKey/EnterPasswordComponent.java b/platform/credential-store/src/com/intellij/credentialStore/EnterPasswordComponent.java similarity index 87% rename from platform/platform-impl/src/com/intellij/ide/passwordSafe/impl/providers/masterKey/EnterPasswordComponent.java rename to platform/credential-store/src/com/intellij/credentialStore/EnterPasswordComponent.java index dc08f97fd29f..27e3b00a6029 100644 --- a/platform/platform-impl/src/com/intellij/ide/passwordSafe/impl/providers/masterKey/EnterPasswordComponent.java +++ b/platform/credential-store/src/com/intellij/credentialStore/EnterPasswordComponent.java @@ -13,8 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.intellij.ide.passwordSafe.impl.providers.masterKey; +package com.intellij.credentialStore; +import com.intellij.credentialStore.macOs.MacOsKeychainLibraryKt; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.ui.ValidationInfo; import com.intellij.openapi.util.SystemInfo; @@ -25,7 +26,7 @@ import java.util.function.Function; /** * @author gregsh */ -public class EnterPasswordComponent extends PasswordComponentBase { +class EnterPasswordComponent extends PasswordComponentBase { @NotNull private final Function myPasswordConsumer; @@ -33,7 +34,7 @@ public class EnterPasswordComponent extends PasswordComponentBase { myPasswordConsumer = passwordConsumer; String note; - if (SystemInfo.isMacIntel64 && SystemInfo.isMacOSLeopard) { + if (MacOsKeychainLibraryKt.isMacOsCredentialStoreSupported()) { note = "The passwords will be stored in the system MacOS keychain."; } else if (SystemInfo.isLinux) { @@ -43,7 +44,7 @@ public class EnterPasswordComponent extends PasswordComponentBase { note = "The passwords will be stored in the KeePass database protected by your Windows account."; } else { - String subNote = SystemInfo.isMacIntel64 ? "at least OS X 10.5 is required" : "your OS is not supported, please file issue"; + String subNote = SystemInfo.isMacIntel64 ? "at least OS X 10.5 is required
to store in the system MacOS keychain" : "your OS is not supported, please file issue"; note = "The passwords will be stored in IDE configuration files with weak protection (" + subNote + ")."; } diff --git a/platform/platform-impl/src/com/intellij/ide/passwordSafe/impl/providers/masterKey/MasterPasswordDialog.java b/platform/credential-store/src/com/intellij/credentialStore/MasterPasswordDialog.java similarity index 97% rename from platform/platform-impl/src/com/intellij/ide/passwordSafe/impl/providers/masterKey/MasterPasswordDialog.java rename to platform/credential-store/src/com/intellij/credentialStore/MasterPasswordDialog.java index eac7989e2edb..9020896d9cfe 100644 --- a/platform/platform-impl/src/com/intellij/ide/passwordSafe/impl/providers/masterKey/MasterPasswordDialog.java +++ b/platform/credential-store/src/com/intellij/credentialStore/MasterPasswordDialog.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.intellij.ide.passwordSafe.impl.providers.masterKey; +package com.intellij.credentialStore; import com.intellij.openapi.ui.DialogWrapper; import com.intellij.openapi.ui.ValidationInfo; diff --git a/platform/platform-impl/src/com/intellij/ide/passwordSafe/impl/providers/masterKey/PasswordComponentBase.form b/platform/credential-store/src/com/intellij/credentialStore/PasswordComponentBase.form similarity index 97% rename from platform/platform-impl/src/com/intellij/ide/passwordSafe/impl/providers/masterKey/PasswordComponentBase.form rename to platform/credential-store/src/com/intellij/credentialStore/PasswordComponentBase.form index 54703817d379..a3c482185681 100644 --- a/platform/platform-impl/src/com/intellij/ide/passwordSafe/impl/providers/masterKey/PasswordComponentBase.form +++ b/platform/credential-store/src/com/intellij/credentialStore/PasswordComponentBase.form @@ -1,5 +1,5 @@ -
+ diff --git a/platform/platform-impl/src/com/intellij/ide/passwordSafe/impl/providers/masterKey/PasswordComponentBase.java b/platform/credential-store/src/com/intellij/credentialStore/PasswordComponentBase.java similarity index 93% rename from platform/platform-impl/src/com/intellij/ide/passwordSafe/impl/providers/masterKey/PasswordComponentBase.java rename to platform/credential-store/src/com/intellij/credentialStore/PasswordComponentBase.java index 64ae2a37b97a..fc659fa69d3e 100644 --- a/platform/platform-impl/src/com/intellij/ide/passwordSafe/impl/providers/masterKey/PasswordComponentBase.java +++ b/platform/credential-store/src/com/intellij/credentialStore/PasswordComponentBase.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.intellij.ide.passwordSafe.impl.providers.masterKey; +package com.intellij.credentialStore; import com.intellij.icons.AllIcons; import com.intellij.openapi.ui.ValidationInfo; @@ -25,7 +25,7 @@ import javax.swing.*; /** * @author gregsh */ -public abstract class PasswordComponentBase { +abstract class PasswordComponentBase { private JPanel myRootPanel; private JLabel myIconLabel; protected JLabel myPromptLabel; @@ -55,4 +55,4 @@ public abstract class PasswordComponentBase { public String getHelpId() { return null; } -} +} \ No newline at end of file diff --git a/platform/platform-impl/src/com/intellij/ide/passwordSafe/impl/providers/masterKey/PasswordDatabase.java b/platform/credential-store/src/com/intellij/credentialStore/PasswordDatabase.java similarity index 94% rename from platform/platform-impl/src/com/intellij/ide/passwordSafe/impl/providers/masterKey/PasswordDatabase.java rename to platform/credential-store/src/com/intellij/credentialStore/PasswordDatabase.java index 0a7e3701a4d4..8aa13c45f6a6 100644 --- a/platform/platform-impl/src/com/intellij/ide/passwordSafe/impl/providers/masterKey/PasswordDatabase.java +++ b/platform/credential-store/src/com/intellij/credentialStore/PasswordDatabase.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.intellij.ide.passwordSafe.impl.providers.masterKey; +package com.intellij.credentialStore; import com.intellij.ide.passwordSafe.impl.providers.ByteArrayWrapper; import com.intellij.openapi.components.PersistentStateComponent; @@ -29,7 +29,7 @@ import java.util.Map; @Deprecated @State(name = "PasswordDatabase", storages = @Storage(value = "security.xml", roamingType = RoamingType.DISABLED, deprecated = true)) -public class PasswordDatabase implements PersistentStateComponent { +class PasswordDatabase implements PersistentStateComponent { private final static Logger LOG = Logger.getInstance(PasswordDatabase.class.getName()); public transient final Map myDatabase = new HashMap<>(); diff --git a/platform/credential-store/src/dbV1Convertor.kt b/platform/credential-store/src/dbV1Convertor.kt index a600a6b93375..c7dd6b4d54a9 100644 --- a/platform/credential-store/src/dbV1Convertor.kt +++ b/platform/credential-store/src/dbV1Convertor.kt @@ -18,9 +18,6 @@ package com.intellij.credentialStore import com.intellij.ide.ApplicationLoadListener import com.intellij.ide.passwordSafe.impl.providers.ByteArrayWrapper import com.intellij.ide.passwordSafe.impl.providers.EncryptionUtil -import com.intellij.ide.passwordSafe.impl.providers.masterKey.EnterPasswordComponent -import com.intellij.ide.passwordSafe.impl.providers.masterKey.MasterPasswordDialog -import com.intellij.ide.passwordSafe.impl.providers.masterKey.PasswordDatabase import com.intellij.ide.passwordSafe.impl.providers.masterKey.windows.WindowsCryptUtils import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.application.PathManager diff --git a/platform/credential-store/test/MasterPasswordMigrationTest.kt b/platform/credential-store/test/MasterPasswordMigrationTest.kt index a1bbe3df629e..c30c0e651c05 100644 --- a/platform/credential-store/test/MasterPasswordMigrationTest.kt +++ b/platform/credential-store/test/MasterPasswordMigrationTest.kt @@ -16,7 +16,6 @@ package com.intellij.credentialStore import com.intellij.ide.passwordSafe.impl.providers.masterKey.MasterKeyPasswordSafeTest -import com.intellij.ide.passwordSafe.impl.providers.masterKey.PasswordDatabase import com.intellij.openapi.util.JDOMUtil import com.intellij.testFramework.ApplicationRule import com.intellij.testFramework.runInEdtAndWait diff --git a/platform/platform-resources/src/META-INF/PlatformExtensions.xml b/platform/platform-resources/src/META-INF/PlatformExtensions.xml index 0432a2ac4d79..4c2e426a25c4 100644 --- a/platform/platform-resources/src/META-INF/PlatformExtensions.xml +++ b/platform/platform-resources/src/META-INF/PlatformExtensions.xml @@ -157,8 +157,7 @@ - +