From 0c8bed4e546ac248be118b41cfa4b002a357e12f Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Wed, 5 Jul 2023 02:40:31 +0530 Subject: feat(crypto-pgpainless): run usability test when adding keys --- .../main/kotlin/app/passwordstore/crypto/errors/CryptoException.kt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crypto-common/src/main') diff --git a/crypto-common/src/main/kotlin/app/passwordstore/crypto/errors/CryptoException.kt b/crypto-common/src/main/kotlin/app/passwordstore/crypto/errors/CryptoException.kt index 6d752964..551a051e 100644 --- a/crypto-common/src/main/kotlin/app/passwordstore/crypto/errors/CryptoException.kt +++ b/crypto-common/src/main/kotlin/app/passwordstore/crypto/errors/CryptoException.kt @@ -22,6 +22,10 @@ public object KeyDeletionFailedException : KeyManagerException("Couldn't delete public object InvalidKeyException : KeyManagerException("Given key cannot be parsed as a known key type") +/** Key failed the [app.passwordstore.crypto.KeyUtils.isKeyUsable] test. */ +public object UnusableKeyException : + KeyManagerException("Given key is not usable for encryption - is it using AEAD?") + /** No key matching `keyId` could be found. */ public class KeyNotFoundException(keyId: String) : KeyManagerException("No key found with id: $keyId") -- cgit v1.2.3