Merge "Keystore 2.0: Fixes in the legacy wrapper."