aboutsummaryrefslogtreecommitdiff
path: root/Command/TestRemote.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-10-01 15:54:37 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-10-01 15:56:39 -0400
commitb9fe55705f19fc39889da6157714039047aed4c9 (patch)
tree107888b257bfcf370353bce2969897046be3af33 /Command/TestRemote.hs
parent55d635e356ecae2dd90d8cea355656faf3b24db1 (diff)
Do verification of checksums of annex objects downloaded from remotes.
* When annex objects are received into git repositories, their checksums are verified then too. * To get the old, faster, behavior of not verifying checksums, set annex.verify=false, or remote.<name>.annex-verify=false. * setkey, rekey: These commands also now verify that the provided file matches the key, unless annex.verify=false. * reinject: Already verified content; this can now be disabled by setting annex.verify=false. recvkey and reinject already did verification, so removed now duplicate code from them. fsck still does its own verification, which is ok since it does not use getViaTmp, so verification doesn't happen twice when using fsck --from.
Diffstat (limited to 'Command/TestRemote.hs')
-rw-r--r--Command/TestRemote.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Command/TestRemote.hs b/Command/TestRemote.hs
index fbe83f2db..e4a9eb829 100644
--- a/Command/TestRemote.hs
+++ b/Command/TestRemote.hs
@@ -159,7 +159,7 @@ test st r k =
Just b -> case verifyKeyContent b of
Nothing -> return True
Just verifier -> verifier k (key2file k)
- get = getViaTmp k $ \dest ->
+ get = getViaTmp (RemoteVerify r) k $ \dest ->
Remote.retrieveKeyFile r k Nothing dest nullMeterUpdate
store = Remote.storeKey r k Nothing nullMeterUpdate
remove = Remote.removeKey r k
@@ -173,10 +173,10 @@ testUnavailable st r k =
, check (`notElem` [Right True, Right False]) "checkPresent" $
Remote.checkPresent r k
, check (== Right False) "retrieveKeyFile" $
- getViaTmp k $ \dest ->
+ getViaTmp (RemoteVerify r) k $ \dest ->
Remote.retrieveKeyFile r k Nothing dest nullMeterUpdate
, check (== Right False) "retrieveKeyFileCheap" $
- getViaTmp k $ \dest ->
+ getViaTmp (RemoteVerify r) k $ \dest ->
Remote.retrieveKeyFileCheap r k Nothing dest
]
where