1
0
mirror of https://github.com/biergaizi/codecrypt synced 2024-06-25 00:08:20 +00:00

action: fix naming on import

This commit is contained in:
Mirek Kratochvil 2013-04-23 20:59:02 +02:00
parent 80fcaf5569
commit 542bf554fa

@ -1046,7 +1046,9 @@ int action_import (bool armor, bool no_action, bool yes, bool fp,
if (keyspec_matches (filter, i->second.name, i->first) ) {
KR.remove_pubkey (i->first);
KR.remove_keypair (i->first);
KR.store_pubkey (i->first, i->second.name,
KR.store_pubkey (i->first,
name.length() ?
name : i->second.name,
i->second.alg, i->second.key);
}
}
@ -1295,7 +1297,9 @@ int action_import_sec (bool armor, bool no_action, bool yes, bool fp,
if (keyspec_matches (filter, i->second.pub.name, i->first) ) {
KR.remove_pubkey (i->first);
KR.remove_keypair (i->first);
KR.store_keypair (i->first, i->second.pub.name,
KR.store_keypair (i->first,
name.length() ?
name : i->second.pub.name,
i->second.pub.alg,
i->second.pub.key, i->second.privkey);
}