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
|
|
@ -34,3 +34,20 @@ public enum PgpKey: CryptographicKey {
|
|||
}
|
||||
}
|
||||
|
||||
public enum SshKey: CryptographicKey {
|
||||
case PRIVATE
|
||||
|
||||
public func getKeychainKey() -> String {
|
||||
switch self {
|
||||
case .PRIVATE:
|
||||
return "sshPrivateKey"
|
||||
}
|
||||
}
|
||||
|
||||
public func getFileSharingPath() -> String {
|
||||
switch self {
|
||||
case .PRIVATE:
|
||||
return Globals.iTunesFileSharingSSHPrivate
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue