Ignore .gpg-id for encryption

This commit is contained in:
Mingshen Sun 2021-01-10 15:27:50 -08:00
parent 011762c4bd
commit f539d2ccfc
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4

View file

@ -720,7 +720,11 @@ public class PasswordStore {
public func encrypt(password: Password, keyID: String? = nil) throws -> Data {
let encryptedDataPath = storeURL.appendingPathComponent(password.url.path)
let keyID = keyID ?? findGPGID(from: encryptedDataPath)
return try PGPAgent.shared.encrypt(plainData: password.plainData, keyID: keyID)
if Defaults.isIgnoreGPGIDOn {
return try PGPAgent.shared.encrypt(plainData: password.plainData)
} else {
return try PGPAgent.shared.encrypt(plainData: password.plainData, keyID: keyID)
}
}
public func removeGitSSHKeys() {