jbtule/keyczar-dotnet

Keytool.exe password --remove doesn't update meta file

Closed this issue · 0 comments

robfe commented

On release: dotnet-0.7.5-beta6

When you use the keytool to add a password, the meta file is updated with "encrypted":true.

When you use the keytool to remove that password, the "encrypted" property is not set back to false. This means that any further operations on the key set cause the following exception:

Unhandled Exception: Keyczar.InvalidKeySetException: Unknown Pbe Cipher
   at Keyczar.Pbe.PbeKeyStore.DecryptKeyData(Func`1 passwordPrompt) in [root]Keyczar\Keyczar\KeySet\Pbe\PbeKeyStore.cs:line 160
   at Keyczar.PbeKeySet.GetKeyData(Int32 version) in [root]Keyczar\Keyczar\KeySet\PbeKeySet.cs:line 70
   at Keyczar.MutableKeySet..ctor(IKeySet keySet) in [root]Keyczar\Keyczar\KeySet\Manage\MutableKeySet.cs:line 68
   at KeyczarTool.Commands.Password.Run(String[] remainingArguments) in [root]Keyczar\KeyczarTool\Commands\Password.cs:line 41
   at ManyConsole.ConsoleCommandDispatcher.DispatchCommand(IEnumerable`1 commands, String[] arguments, TextWriter consoleOut) in c:\src\ManyConsole\ManyConsole\ConsoleCommandDispatcher.cs:line 70
   at KeyczarTool.Program.Main(String[] args) in [root]Keyczar\KeyczarTool\Program.cs:line 4