Store SSH private keys in Keychain instead of files
This commit is contained in:
parent
6b95e60ea1
commit
f1337622dc
9 changed files with 45 additions and 30 deletions
|
|
@ -71,7 +71,7 @@ class GitSSHKeyArmorSettingTableViewController: AutoCellHeightUITableViewControl
|
|||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
armorPrivateKeyTextView.text = SharedDefaults[.gitSSHPrivateKeyArmor]
|
||||
armorPrivateKeyTextView.text = AppKeychain.get(for: SshKey.PRIVATE.getKeychainKey())
|
||||
armorPrivateKeyTextView.delegate = self
|
||||
|
||||
scanPrivateKeyCell?.textLabel?.text = "ScanPrivateKeyQrCodes".localize()
|
||||
|
|
@ -81,7 +81,6 @@ class GitSSHKeyArmorSettingTableViewController: AutoCellHeightUITableViewControl
|
|||
}
|
||||
|
||||
@IBAction func doneButtonTapped(_ sender: Any) {
|
||||
SharedDefaults[.gitSSHPrivateKeyArmor] = armorPrivateKeyTextView.text
|
||||
do {
|
||||
try passwordStore.initGitSSHKey(with: armorPrivateKeyTextView.text)
|
||||
} catch {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue