implement isCryptographicallySecureKey for VURL
Considerable difficulty to work around an import cycle. Had to move the list of backends (except for VURL) to Backend.Variety to VURL could use it. Sponsored-by: Kevin Mueller on Patreon
This commit is contained in:
parent
e7b7ea78af
commit
cc17ac423b
16 changed files with 143 additions and 64 deletions
|
@ -1,5 +1,4 @@
|
|||
{- git-annex "URL" and "VURL" backends -- keys whose content is
|
||||
- available from urls.
|
||||
{- git-annex URL backend -- keys whose content is available from urls.
|
||||
-
|
||||
- Copyright 2011-2024 Joey Hess <id@joeyh.name>
|
||||
-
|
||||
|
@ -15,10 +14,9 @@ import Annex.Common
|
|||
import Types.Key
|
||||
import Types.Backend
|
||||
import Backend.Utilities
|
||||
import Logs.EquivilantKeys
|
||||
|
||||
backends :: [Backend]
|
||||
backends = [backendURL, backendVURL]
|
||||
backends = [backendURL]
|
||||
|
||||
backendURL :: Backend
|
||||
backendURL = Backend
|
||||
|
@ -31,25 +29,8 @@ backendURL = Backend
|
|||
-- The content of an url can change at any time, so URL keys are
|
||||
-- not stable.
|
||||
, isStableKey = const False
|
||||
, isCryptographicallySecure = pure False
|
||||
}
|
||||
|
||||
backendVURL :: Backend
|
||||
backendVURL = Backend
|
||||
{ backendVariety = VURLKey
|
||||
, genKey = Nothing
|
||||
, verifyKeyContent = Nothing -- TODO
|
||||
, verifyKeyContentIncrementally = Nothing -- TODO
|
||||
, canUpgradeKey = Nothing
|
||||
, fastMigrate = Nothing
|
||||
-- Even if a hash is recorded on initial download from the web and
|
||||
-- is used to verify every subsequent transfer including other
|
||||
-- downloads from the web, in a split-brain situation there
|
||||
-- can be more than one hash and different versions of the content.
|
||||
-- So the content is not stable.
|
||||
, isStableKey = const False
|
||||
, isCryptographicallySecure = pure False
|
||||
-- TODO it is when all recorded hashes are
|
||||
, isCryptographicallySecure = False
|
||||
, isCryptographicallySecureKey = const (pure False)
|
||||
}
|
||||
|
||||
{- Every unique url has a corresponding key. -}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue