Add PGPAgent tests and minor updated

This commit is contained in:
Yishi Lin 2019-07-20 00:16:51 +08:00
parent a628a9b4da
commit e967bb1f4c
8 changed files with 68 additions and 43 deletions

View file

@ -730,14 +730,6 @@ public class PasswordStore {
gitSSHPrivateKeyPassphrase = nil
}
public func pgpKeyExists(inFileSharing: Bool = false) -> Bool {
if inFileSharing == false {
return fm.fileExists(atPath: Globals.pgpPublicKeyPath) && fm.fileExists(atPath: Globals.pgpPrivateKeyPath)
} else {
return KeyFileManager.PublicPgp.doesKeyFileExist() && KeyFileManager.PrivatePgp.doesKeyFileExist()
}
}
public func gitSSHKeyImportFromFileSharing() throws {
try KeyFileManager.PrivateSsh.importKeyAndDeleteFile()
}