Check existence of PGP keys before encrypt/decrypt
This commit is contained in:
parent
50dec23b02
commit
0cae6af60d
6 changed files with 41 additions and 4 deletions
|
|
@ -16,7 +16,8 @@ public enum AppError: Error, Equatable {
|
|||
case GitReset
|
||||
case GitCommit
|
||||
case PasswordEntity
|
||||
case PgpPublicKeyNotExist
|
||||
case PgpPublicKeyNotFound(keyID: String)
|
||||
case PgpPrivateKeyNotFound(keyID: String)
|
||||
case KeyExpiredOrIncompatible
|
||||
case WrongPassphrase
|
||||
case WrongPasswordFilename
|
||||
|
|
@ -32,6 +33,8 @@ extension AppError: LocalizedError {
|
|||
switch self {
|
||||
case let .RepositoryRemoteBranchNotFound(name), let .RepositoryBranchNotFound(name), let .ReadingFile(name):
|
||||
return localizationKey.localize(name)
|
||||
case let .PgpPublicKeyNotFound(keyID), let .PgpPrivateKeyNotFound(keyID):
|
||||
return localizationKey.localize(keyID)
|
||||
default:
|
||||
return localizationKey.localize()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue