Open arlolra opened 9 years ago
@arlolra when importing, there are certainly duplicate records. There are 2 types: same account name, protocol but different private key; and same account name, protocol and private key. How do we handle it? btw, the link is dead.
Fixed the link, thanks.
The way I imagined this working is that, in the same preference pane where we let the user generate a new key, there's a button to import a key. If you pass it an otr.private_key
file, it would parse it and present the user options to disambiguate, assuming there's more than one key in the file and no accountname/protocol match.
I'm not sure if that's a great user interaction though. And with multiple accounts could be tedious. But let's assume this is for people coming over from Pidgin or Adium (or, I guess, restoring from backup). Tor Messenger will soon have a secure updater, so this manual copying between versions will come to an end.
If you pass it an otr.private_key file, it would parse it and present the user options to disambiguate, assuming there's more than one key in the file and no accountname/protocol match.
Assume in the current otr.private_key
there is a key K
of an account name a
with a protocol p
, and in the importing file there is a key K'
of same account a
with the protocol p
, so the UI will present the user options to choose which key to keep, right?
The way I described it above, it isn't a bulk import; it's per account. So, if the user wanted to keep the current key, they wouldn't be importing one for that account.
This can be done by manually copying
otr.*
files into the profile folder (see https://trac.torproject.org/projects/tor/wiki/doc/TorMessenger/FAQ#WherearemyOTRkeysstoredHowcanIpreservethemacrossupdates), but making it easier would be nice.