lift isCryptographicallySecure to Annex
Needed for VURL backend. Sponsored-by: Nicholas Golder-Manning on Patreon
This commit is contained in:
parent
55bf01b788
commit
e7b7ea78af
8 changed files with 15 additions and 14 deletions
|
@ -72,7 +72,7 @@ makeBackend' ebname@(ExternalBackendName bname) hasext (Right p) = do
|
|||
, canUpgradeKey = Nothing
|
||||
, fastMigrate = Nothing
|
||||
, isStableKey = const isstable
|
||||
, isCryptographicallySecure = iscryptographicallysecure
|
||||
, isCryptographicallySecure = pure iscryptographicallysecure
|
||||
}
|
||||
makeBackend' ebname hasext (Left _) = return $ unavailBackend ebname hasext
|
||||
|
||||
|
@ -86,7 +86,7 @@ unavailBackend (ExternalBackendName bname) hasext =
|
|||
, canUpgradeKey = Nothing
|
||||
, fastMigrate = Nothing
|
||||
, isStableKey = const False
|
||||
, isCryptographicallySecure = False
|
||||
, isCryptographicallySecure = pure False
|
||||
}
|
||||
|
||||
genKeyExternal :: ExternalBackendName -> HasExt -> KeySource -> MeterUpdate -> Annex Key
|
||||
|
|
|
@ -81,7 +81,7 @@ genBackend hash = Backend
|
|||
, canUpgradeKey = Just needsUpgrade
|
||||
, fastMigrate = Just trivialMigrate
|
||||
, isStableKey = const True
|
||||
, isCryptographicallySecure = cryptographicallySecure hash
|
||||
, isCryptographicallySecure = pure $ cryptographicallySecure hash
|
||||
}
|
||||
|
||||
genBackendE :: Hash -> Backend
|
||||
|
|
|
@ -31,7 +31,7 @@ backendURL = Backend
|
|||
-- The content of an url can change at any time, so URL keys are
|
||||
-- not stable.
|
||||
, isStableKey = const False
|
||||
, isCryptographicallySecure = False
|
||||
, isCryptographicallySecure = pure False
|
||||
}
|
||||
|
||||
backendVURL :: Backend
|
||||
|
@ -48,7 +48,7 @@ backendVURL = Backend
|
|||
-- can be more than one hash and different versions of the content.
|
||||
-- So the content is not stable.
|
||||
, isStableKey = const False
|
||||
, isCryptographicallySecure = False
|
||||
, isCryptographicallySecure = pure False
|
||||
-- TODO it is when all recorded hashes are
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ backend = Backend
|
|||
, canUpgradeKey = Just needsUpgrade
|
||||
, fastMigrate = Just removeProblemChars
|
||||
, isStableKey = const True
|
||||
, isCryptographicallySecure = False
|
||||
, isCryptographicallySecure = pure False
|
||||
}
|
||||
|
||||
{- The key includes the file size, modification time, and the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue