summaryrefslogtreecommitdiff
path: root/Crypto.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-09-04 21:54:10 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-09-04 21:54:10 -0400
commit17a5f70ed26b14a15a50d237f47eb68eb9c2753d (patch)
treed66a7a1b143ec2ec8d7fda14adc3ede338035dc5 /Crypto.hs
parent09bd4393d971f3d069c5e67f9a9bb34d1e6480b2 (diff)
wording
Diffstat (limited to 'Crypto.hs')
-rw-r--r--Crypto.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Crypto.hs b/Crypto.hs
index ed558d8c3..f8628abb1 100644
--- a/Crypto.hs
+++ b/Crypto.hs
@@ -89,10 +89,11 @@ updateEncryptedCipher [] encipher = return encipher
updateEncryptedCipher newkeys encipher@(EncryptedCipher _ symmetric (KeyIds ks)) = do
dropKeys <- listKeyIds [ k | (False, k) <- newkeys ]
forM_ dropKeys $ \k -> unless (k `elem` ks) $
- error $ "Key " ++ k ++ " is not granted access."
+ error $ "Key " ++ k ++ " was not present; cannot remove."
addKeys <- listKeyIds [ k | (True, k) <- newkeys ]
let ks' = (addKeys ++ ks) \\ dropKeys
- when (null ks') $ error "That would empty the access list."
+ when (null ks') $
+ error "Cannot remove the last key."
cipher <- decryptCipher encipher
encryptCipher cipher symmetric $ KeyIds ks'
where
@@ -108,7 +109,7 @@ describeCipher (EncryptedCipher _ symmetric (KeyIds ks)) =
keys _ = "keys"
{- Encrypts a Cipher to the specified KeyIds. The boolean indicates
- - whether to encrypt an hybrid cipher (True), which is going to be used
+ - whether to encrypt a hybrid cipher (True), which is going to be used
- both for MAC'ing and symmetric encryption of file contents, or for
- MAC'ing only (False), while pubkey crypto is used for file contents.
- -}