VirtusLab / gpki

Git Public Key Infrastructure
1 stars 0 forks source link

`Import_key`: remove all keys from given file if import any of the key failed #26

Closed rifel123 closed 2 years ago

rifel123 commented 2 years ago

When we fail to import any key from a file, we should remove all keys from this file, as they are corrupted.

mzarnowski commented 2 years ago

Corner case here is that if the file contains an unchanged key (as in: it was already present in the keychain), we should obviously not remove it from the keychain.

Interesting case is: what, if we change e.g. expiration date using the file and then have to revert it. We should explore verifying all of the keys before taking any action on them (and possibly allowing the user to choose which keys they want to import and which to ignore).

rifel123 commented 2 years ago

closed with #41