diff --git a/bundles/org.eclipse.equinox.security.win32.x86_64/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.security.win32.x86_64/META-INF/MANIFEST.MF index f4469bad1ec..091c1d69c03 100644 --- a/bundles/org.eclipse.equinox.security.win32.x86_64/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.equinox.security.win32.x86_64/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %fragmentName Bundle-SymbolicName: org.eclipse.equinox.security.win32.x86_64;singleton:=true -Bundle-Version: 1.2.0.qualifier +Bundle-Version: 1.2.100.qualifier Bundle-Vendor: %providerName Fragment-Host: org.eclipse.equinox.security;bundle-version="[1.0.0,2.0.0)" Bundle-RequiredExecutionEnvironment: JavaSE-17 diff --git a/bundles/org.eclipse.equinox.security.win32.x86_64/about.html b/bundles/org.eclipse.equinox.security.win32.x86_64/about.html index 164f781a8fd..8eee37d4705 100644 --- a/bundles/org.eclipse.equinox.security.win32.x86_64/about.html +++ b/bundles/org.eclipse.equinox.security.win32.x86_64/about.html @@ -33,4 +33,4 @@

License

- \ No newline at end of file + diff --git a/bundles/org.eclipse.equinox.security.win32.x86_64/pom.xml b/bundles/org.eclipse.equinox.security.win32.x86_64/pom.xml index cbffce34fbb..9d9b36da7ff 100644 --- a/bundles/org.eclipse.equinox.security.win32.x86_64/pom.xml +++ b/bundles/org.eclipse.equinox.security.win32.x86_64/pom.xml @@ -19,7 +19,7 @@ org.eclipse.equinox org.eclipse.equinox.security.win32.x86_64 - 1.2.0-SNAPSHOT + 1.2.100-SNAPSHOT eclipse-plugin diff --git a/bundles/org.eclipse.equinox.security.win32.x86_64/src/org/eclipse/equinox/internal/security/win32/WinCrypto.java b/bundles/org.eclipse.equinox.security.win32.x86_64/src/org/eclipse/equinox/internal/security/win32/WinCrypto.java index 85adcd67a93..7ccedabb118 100644 --- a/bundles/org.eclipse.equinox.security.win32.x86_64/src/org/eclipse/equinox/internal/security/win32/WinCrypto.java +++ b/bundles/org.eclipse.equinox.security.win32.x86_64/src/org/eclipse/equinox/internal/security/win32/WinCrypto.java @@ -40,7 +40,7 @@ public class WinCrypto extends PasswordProvider { static { System.loadLibrary("jnicrypt64"); } - + private final static String WIN_PROVIDER_NODE = "/org.eclipse.equinox.secure.storage/windows64"; private final static String PASSWORD_KEY = "encryptedPassword"; @@ -56,14 +56,15 @@ public PBEKeySpec getPassword(IPreferencesContainer container, int passwordType) encryptedPassword = getEncryptedPassword(container); else encryptedPassword = null; - + if (encryptedPassword != null) { byte[] decryptedPassword = windecrypt(encryptedPassword); if (decryptedPassword != null) { String password = new String(decryptedPassword); return new PBEKeySpec(password.toCharArray()); } else { - StorageException e = new StorageException(StorageException.ENCRYPTION_ERROR, WinCryptoMessages.decryptPasswordFailed); + StorageException e = new StorageException(StorageException.ENCRYPTION_ERROR, + WinCryptoMessages.decryptPasswordFailed); AuthPlugin.getDefault().logError(WinCryptoMessages.decryptPasswordFailed, e); return null; } @@ -71,7 +72,7 @@ public PBEKeySpec getPassword(IPreferencesContainer container, int passwordType) // add info message in the log AuthPlugin.getDefault().logMessage(WinCryptoMessages.newPasswordGenerated); - + byte[] rawPassword = new byte[PASSWORD_LENGTH]; SecureRandom random = new SecureRandom(); random.setSeed(System.currentTimeMillis()); @@ -85,7 +86,7 @@ public PBEKeySpec getPassword(IPreferencesContainer container, int passwordType) private byte[] getEncryptedPassword(IPreferencesContainer container) { ISecurePreferences node = container.getPreferences().node(WIN_PROVIDER_NODE); - String passwordHint; + String passwordHint; try { passwordHint = node.get(PASSWORD_KEY, null); } catch (StorageException e) { // should never happen in this scenario @@ -97,10 +98,11 @@ private byte[] getEncryptedPassword(IPreferencesContainer container) { return Base64.decode(passwordHint); } - private boolean savePassword(String password, IPreferencesContainer container){ + private boolean savePassword(String password, IPreferencesContainer container) { byte[] data = winencrypt(password.getBytes()); if (data == null) { // this is bad. Something wrong with OS or JNI. - StorageException e = new StorageException(StorageException.ENCRYPTION_ERROR, WinCryptoMessages.encryptPasswordFailed); + StorageException e = new StorageException(StorageException.ENCRYPTION_ERROR, + WinCryptoMessages.encryptPasswordFailed); AuthPlugin.getDefault().logError(WinCryptoMessages.encryptPasswordFailed, e); return false; } @@ -125,7 +127,8 @@ private boolean savePassword(String password, IPreferencesContainer container){ public boolean retryOnError(Exception e, IPreferencesContainer container) { // It would be rather dangerous to allow this password to be changed // as it would permanently trash all entries in the secure storage. - // Rather applications using get...() should handle exceptions and offer to overwrite + // Rather applications using get...() should handle exceptions and offer to + // overwrite // data on an entry-by-entry scale. return false; }