Bug 577725 - Possible corruption of Secure Storage file after Change Password

After using the "Change Password..." button of the Secure Storage
preference page the secure_storage file could end-up corrupted if
the application quits unexpectedly (kill -9, Ctrl+C, Force Quit
in macOS or a crash).

After being corrupted, the following kind of exception is thrown:

org.eclipse.equinox.security.storage.StorageException: Given final block not properly padded. Such issues can arise if a bad key is used during decryption.
Caused by: javax.crypto.BadPaddingException: Given final block not properly padded. Such issues can arise if a bad key is used during decryption.

This was caused due to not flushing the re-encrypted entries, just the
verification node updated by the master password provider.

Flushing the entries at the end of the re-encryption prevents such
scenarios.

Changed the service segment of the versions to fix Jenkins build
complaining that 'Only qualifier changed for ...'

Signed-off-by: Martin D'Aloia <martindaloia@gmail.com>
Change-Id: Icca6d98e05fca02f35e9f93242d57623d79622c4
Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.bundles/+/188996
Tested-by: Thomas Watson <tjwatson@us.ibm.com>
Reviewed-by: Thomas Watson <tjwatson@us.ibm.com>
12 files changed