plumb VerifyConfig into retrieveKeyFile

This fixes the recent reversion that annex.verify is not honored,
because retrieveChunks was passed RemoteVerify baser, but baser
did not have export/import set up.

Sponsored-by: Dartmouth College's DANDI project
This commit is contained in:
Joey Hess 2021-08-17 12:41:36 -04:00
parent 4bbc6a25fa
commit f0754a61f5
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
21 changed files with 64 additions and 55 deletions

View file

@ -16,6 +16,7 @@ module Types.Remote
, RemoteStateHandle
, SetupStage(..)
, Availability(..)
, VerifyConfigA(..)
, Verification(..)
, unVerified
, RetrievalSecurityPolicy(..)
@ -95,7 +96,7 @@ data RemoteA a = Remote
-- (The MeterUpdate does not need to be used if it writes
-- sequentially to the file.)
-- Throws exception on failure.
, retrieveKeyFile :: Key -> AssociatedFile -> FilePath -> MeterUpdate -> a Verification
, retrieveKeyFile :: Key -> AssociatedFile -> FilePath -> MeterUpdate -> VerifyConfigA a -> a Verification
-- Retrieves a key's contents to a tmp file, if it can be done cheaply.
-- It's ok to create a symlink or hardlink.
-- Throws exception on failure.
@ -192,6 +193,12 @@ instance Ord (RemoteA a) where
instance ToUUID (RemoteA a) where
toUUID = uuid
data VerifyConfigA a
= AlwaysVerify
| NoVerify
| RemoteVerify (RemoteA a)
| DefaultVerify
data Verification
= UnVerified
-- ^ Content was not verified during transfer, but is probably