This file is indexed.

/usr/share/doc/libghc-hackage-security-doc/html/Hackage-Security-Trusted.html is in libghc-hackage-security-doc 0.5.2.2-8build8.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Hackage.Security.Trusted</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Hackage-Security-Trusted.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Hackage-Security-Trusted.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hackage-security-0.5.2.2: Hackage security library</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Hackage.Security.Trusted</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Trusted values</a></li><li><a href="#g:2">Verification errors</a></li><li><a href="#g:3">Role verification</a></li><li><a href="#g:4">Re-exports</a></li><li><a href="#g:5">Derived functions</a><ul><li><a href="#g:6">Role verification</a></li><li><a href="#g:7">File info verification</a></li></ul></li></ul></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">newtype</span> <a href="#t:Trusted">Trusted</a> a = <a href="#v:DeclareTrusted">DeclareTrusted</a> {<ul class="subs"><li><a href="#v:trusted">trusted</a> :: a</li></ul>}</li><li class="src short"><a href="#v:trustStatic">trustStatic</a> :: <a href="Hackage-Security-Trusted.html#t:StaticPtr">StaticPtr</a> a -&gt; <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> a</li><li class="src short"><a href="#v:trustVerified">trustVerified</a> :: <a href="Hackage-Security-Trusted.html#t:SignaturesVerified">SignaturesVerified</a> a -&gt; <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> a</li><li class="src short"><a href="#v:trustApply">trustApply</a> :: <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> (a -&gt; b) -&gt; <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> a -&gt; <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> b</li><li class="src short"><a href="#v:trustElems">trustElems</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Traversable.html#t:Traversable">Traversable</a> f =&gt; <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> (f a) -&gt; f (<a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> a)</li><li class="src short"><span class="keyword">data</span> <a href="#t:VerificationError">VerificationError</a><ul class="subs"><li>= <a href="#v:VerificationErrorSignatures">VerificationErrorSignatures</a> <a href="Hackage-Security-TUF-FileMap.html#t:TargetPath">TargetPath</a></li><li>| <a href="#v:VerificationErrorExpired">VerificationErrorExpired</a> <a href="Hackage-Security-TUF-FileMap.html#t:TargetPath">TargetPath</a></li><li>| <a href="#v:VerificationErrorVersion">VerificationErrorVersion</a> <a href="Hackage-Security-TUF-FileMap.html#t:TargetPath">TargetPath</a></li><li>| <a href="#v:VerificationErrorFileInfo">VerificationErrorFileInfo</a> <a href="Hackage-Security-TUF-FileMap.html#t:TargetPath">TargetPath</a></li><li>| <a href="#v:VerificationErrorUnknownTarget">VerificationErrorUnknownTarget</a> <a href="Hackage-Security-TUF-FileMap.html#t:TargetPath">TargetPath</a></li><li>| <a href="#v:VerificationErrorMissingSHA256">VerificationErrorMissingSHA256</a> <a href="Hackage-Security-TUF-FileMap.html#t:TargetPath">TargetPath</a></li><li>| <a href="#v:VerificationErrorDeserialization">VerificationErrorDeserialization</a> <a href="Hackage-Security-TUF-FileMap.html#t:TargetPath">TargetPath</a> <a href="Hackage-Security-JSON.html#t:DeserializationError">DeserializationError</a></li><li>| <a href="#v:VerificationErrorLoop">VerificationErrorLoop</a> <a href="Hackage-Security-Trusted.html#t:VerificationHistory">VerificationHistory</a></li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:RootUpdated">RootUpdated</a> = <a href="#v:RootUpdated">RootUpdated</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:VerificationHistory">VerificationHistory</a> = [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> <a href="Hackage-Security-Trusted.html#t:RootUpdated">RootUpdated</a> <a href="Hackage-Security-Trusted.html#t:VerificationError">VerificationError</a>]</li><li class="src short"><span class="keyword">data</span> <a href="#t:SignaturesVerified">SignaturesVerified</a> a</li><li class="src short"><a href="#v:signaturesVerified">signaturesVerified</a> :: <a href="Hackage-Security-Trusted.html#t:SignaturesVerified">SignaturesVerified</a> a -&gt; a</li><li class="src short"><a href="#v:verifyRole-39-">verifyRole'</a> :: <span class="keyword">forall</span> a. <a href="Hackage-Security-Server.html#t:HasHeader">HasHeader</a> a =&gt; <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> (<a href="Hackage-Security-Server.html#t:RoleSpec">RoleSpec</a> a) -&gt; <a href="Hackage-Security-TUF-FileMap.html#t:TargetPath">TargetPath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Hackage-Security-Server.html#t:FileVersion">FileVersion</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Clock.html#t:UTCTime">UTCTime</a> -&gt; <a href="Hackage-Security-Server.html#t:Signed">Signed</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> <a href="Hackage-Security-Trusted.html#t:VerificationError">VerificationError</a> (<a href="Hackage-Security-Trusted.html#t:SignaturesVerified">SignaturesVerified</a> a)</li><li class="src short"><a href="#v:verifyFingerprints">verifyFingerprints</a> :: [<a href="Hackage-Security-Server.html#t:KeyId">KeyId</a>] -&gt; <a href="Hackage-Security-Server.html#t:KeyThreshold">KeyThreshold</a> -&gt; <a href="Hackage-Security-TUF-FileMap.html#t:TargetPath">TargetPath</a> -&gt; <a href="Hackage-Security-Server.html#t:Signed">Signed</a> <a href="Hackage-Security-Server.html#t:Root">Root</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> <a href="Hackage-Security-Trusted.html#t:VerificationError">VerificationError</a> (<a href="Hackage-Security-Trusted.html#t:SignaturesVerified">SignaturesVerified</a> <a href="Hackage-Security-Server.html#t:Root">Root</a>)</li><li class="src short"><span class="keyword">data</span> <a href="#t:StaticPtr">StaticPtr</a> a :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a></li><li class="src short"><a href="#v:-60--36--36--62-">(&lt;$$&gt;)</a> :: <a href="Hackage-Security-Trusted.html#t:StaticPtr">StaticPtr</a> (a -&gt; b) -&gt; <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> a -&gt; <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> b</li><li class="src short"><span class="keyword">class</span> <a href="#t:VerifyRole">VerifyRole</a> a <span class="keyword">where</span><ul class="subs"></ul></li><li class="src short"><a href="#v:trustedFileInfoEqual">trustedFileInfoEqual</a> :: <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> <a href="Hackage-Security-Server.html#t:FileInfo">FileInfo</a> -&gt; <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> <a href="Hackage-Security-Server.html#t:FileInfo">FileInfo</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li></ul></div><div id="interface"><h1 id="g:1">Trusted values</h1><div class="top"><p class="src"><span class="keyword">newtype</span> <a id="t:Trusted" class="def">Trusted</a> a <a href="src/Hackage-Security-Trusted-TCB.html#Trusted" class="link">Source</a> <a href="#t:Trusted" class="selflink">#</a></p><div class="doc"><p>Trusted values</p><p>Trusted values originate in only two ways:</p><ul><li>Anything that is statically known is trusted (<code><a href="Hackage-Security-Trusted.html#v:trustStatic">trustStatic</a></code>)</li><li>If we have &quot;dynamic&quot; data we can trust it once we have verified the
   the signatures (trustSigned).</li></ul><p>NOTE: Trusted is NOT a functor. If it was we could define</p><pre>trustAnything :: a -&gt; Trusted a
trustAnything a = fmap (const a) (trustStatic (static ()))</pre><p>Consequently, it is neither a monad nor a comonad. However, we _can_ apply
 trusted functions to trusted arguments (<code><a href="Hackage-Security-Trusted.html#v:trustApply">trustApply</a></code>).</p><p>The <code><a href="Hackage-Security-Trusted.html#v:DeclareTrusted">DeclareTrusted</a></code> constructor is exported, but any use of it should be
 verified.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:DeclareTrusted" class="def">DeclareTrusted</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:trusted" class="def">trusted</a> :: a</dfn><div class="doc empty">&nbsp;</div></li></ul></div></td></tr></table></div><div class="subs instances"><p id="control.i:Trusted" class="caption collapser" onclick="toggleSection('i:Trusted')">Instances</p><div id="section.i:Trusted" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Trusted:Eq:1" class="instance expander" onclick="toggleSection('i:id:Trusted:Eq:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> (<a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> a)</span> <a href="src/Hackage-Security-Trusted-TCB.html#line-70" class="link">Source</a> <a href="#t:Trusted" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Trusted:Eq:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> a -&gt; <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> a -&gt; <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Trusted:Show:2" class="instance expander" onclick="toggleSection('i:id:Trusted:Show:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> a =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> (<a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> a)</span> <a href="src/Hackage-Security-Trusted-TCB.html#line-70" class="link">Source</a> <a href="#t:Trusted" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Trusted:Show:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> a] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:trustStatic" class="def">trustStatic</a> :: <a href="Hackage-Security-Trusted.html#t:StaticPtr">StaticPtr</a> a -&gt; <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> a <a href="src/Hackage-Security-Trusted-TCB.html#trustStatic" class="link">Source</a> <a href="#v:trustStatic" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:trustVerified" class="def">trustVerified</a> :: <a href="Hackage-Security-Trusted.html#t:SignaturesVerified">SignaturesVerified</a> a -&gt; <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> a <a href="src/Hackage-Security-Trusted-TCB.html#trustVerified" class="link">Source</a> <a href="#v:trustVerified" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:trustApply" class="def">trustApply</a> :: <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> (a -&gt; b) -&gt; <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> a -&gt; <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> b <a href="src/Hackage-Security-Trusted-TCB.html#trustApply" class="link">Source</a> <a href="#v:trustApply" class="selflink">#</a></p><div class="doc"><p>Equivalent of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#v:-60--42--62-">&lt;*&gt;</a></code></p><p>Trusted isn't quite applicative (no pure, not a functor), but it is
 somehow Applicative-like: we have the equivalent of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#v:-60--42--62-">&lt;*&gt;</a></code></p></div></div><div class="top"><p class="src"><a id="v:trustElems" class="def">trustElems</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Traversable.html#t:Traversable">Traversable</a> f =&gt; <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> (f a) -&gt; f (<a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> a) <a href="src/Hackage-Security-Trusted-TCB.html#trustElems" class="link">Source</a> <a href="#v:trustElems" class="selflink">#</a></p><div class="doc"><p>Trust all elements of some trusted (traversable) container</p><p>If we have, say, a trusted list of values, we should be able to get a list
 of trusted values out of it.</p><pre>trustElems :: Trusted [a] -&gt; [Trusted a]</pre><p>NOTE. It might appear that the more natural primitive to offer is a
 <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Traversable.html#v:sequenceA">sequenceA</a></code>-like operator such as</p><pre>trustSeq :: Applicative f =&gt; Trusted (f a) -&gt; f (Trusted a)</pre><p>However, this is unsound. To see this, consider that <code>((-&gt;) a)</code> is
 <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#t:Applicative">Applicative</a></code> (it's the reader monad); hence, we can instantiate <code>trustSeq</code>
 at</p><pre>trustSeq :: Trusted (a -&gt; a) -&gt; a -&gt; Trusted a</pre><p>and by passing <code>trustStatic (static id)</code> make <code><a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a></code> a functor, which we
 certainly don't want to do (see comments for <code><a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a></code>).</p><p>So why is it okay when we insist on <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Traversable.html#t:Traversable">Traversable</a></code> rather than <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#t:Applicative">Applicative</a></code>?
 To see this, it's instructive to consider how we might make a <code>((-&gt;) a)</code> an
 instance of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Traversable.html#t:Traversable">Traversable</a></code>. If we define the domain of enumerable types as</p><pre>class Eq a =&gt; Enumerable a where
  enumerate :: [a]</pre><p>then we can make <code>((-&gt;) r)</code> traversable by</p><pre>instance Enumerable r =&gt; Traversable ((-&gt;) r) where
  sequenceA f = rebuild &lt;$&gt; sequenceA ((\r -&gt; (r,) &lt;$&gt; f r) &lt;$&gt; enumerate)
    where
      rebuild :: [(r, a)] -&gt; r -&gt; a
      rebuild fun arg = fromJust (lookup arg fun)</pre><p>The idea is that if the domain of a function is enumerable, we can apply the
 function to each possible input, collect the outputs, and construct a new
 function by pairing the inputs with the outputs. I.e., if we had something of
 type</p><pre>a -&gt; IO b</pre><p>and <code>a</code> is enumerable, we just run the <code>IO</code> action on each possible <code>a</code> and
 collect all <code>b</code>s to get a pure function <code>a -&gt; b</code>. Of course, you probably
 don't want to be doing that, but the point is that as far as the type system
 is concerned you could.</p><p>In the context of <code><a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a></code>, this means that we can derive</p><pre>enumPure :: Enumerable a =&gt; a -&gt; Trusted a</pre><p>but in a way this this makes sense anyway. If a domain is enumerable, it
 would not be unreasonable to change <code>Enumerable</code> to</p><pre>class Eq a =&gt; Enumerable a where
  enumerate :: [StaticPtr a]</pre><p>so we could define <code>enumPure</code> as</p><pre>enumPure :: Enumerable a =&gt; a -&gt; Trusted a
enumPure x = trustStatic
           $ fromJust (find ((== x) . deRefStaticPtr) enumerate)</pre><p>In other words, we just enumerate the entire domain as trusted values
 (because we defined them locally) and then return the one that matched the
 untrusted value.</p><p>The conclusion from all of this is that the types of untrusted input  (like
 the types of the TUF files we download from the server) should probably not
 be considered enumerable.</p></div></div><h1 id="g:2">Verification errors</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:VerificationError" class="def">VerificationError</a> <a href="src/Hackage-Security-Trusted-TCB.html#VerificationError" class="link">Source</a> <a href="#t:VerificationError" class="selflink">#</a></p><div class="doc"><p>Errors thrown during role validation</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:VerificationErrorSignatures" class="def">VerificationErrorSignatures</a> <a href="Hackage-Security-TUF-FileMap.html#t:TargetPath">TargetPath</a></td><td class="doc"><p>Not enough signatures signed with the appropriate keys</p></td></tr><tr><td class="src"><a id="v:VerificationErrorExpired" class="def">VerificationErrorExpired</a> <a href="Hackage-Security-TUF-FileMap.html#t:TargetPath">TargetPath</a></td><td class="doc"><p>The file is expired</p></td></tr><tr><td class="src"><a id="v:VerificationErrorVersion" class="def">VerificationErrorVersion</a> <a href="Hackage-Security-TUF-FileMap.html#t:TargetPath">TargetPath</a></td><td class="doc"><p>The file version is less than the previous version</p></td></tr><tr><td class="src"><a id="v:VerificationErrorFileInfo" class="def">VerificationErrorFileInfo</a> <a href="Hackage-Security-TUF-FileMap.html#t:TargetPath">TargetPath</a></td><td class="doc"><p>File information mismatch</p></td></tr><tr><td class="src"><a id="v:VerificationErrorUnknownTarget" class="def">VerificationErrorUnknownTarget</a> <a href="Hackage-Security-TUF-FileMap.html#t:TargetPath">TargetPath</a></td><td class="doc"><p>We tried to lookup file information about a particular target file,
 but the information wasn't in the corresponding <code>targets.json</code> file.</p></td></tr><tr><td class="src"><a id="v:VerificationErrorMissingSHA256" class="def">VerificationErrorMissingSHA256</a> <a href="Hackage-Security-TUF-FileMap.html#t:TargetPath">TargetPath</a></td><td class="doc"><p>The metadata for the specified target is missing a SHA256</p></td></tr><tr><td class="src"><a id="v:VerificationErrorDeserialization" class="def">VerificationErrorDeserialization</a> <a href="Hackage-Security-TUF-FileMap.html#t:TargetPath">TargetPath</a> <a href="Hackage-Security-JSON.html#t:DeserializationError">DeserializationError</a></td><td class="doc"><p>Some verification errors materialize as deserialization errors</p><p>For example: if we try to deserialize a timestamp file but the timestamp
 key has been rolled over, deserialization of the file will fail with
 <code><a href="Hackage-Security-JSON.html#v:DeserializationErrorUnknownKey">DeserializationErrorUnknownKey</a></code>.</p></td></tr><tr><td class="src"><a id="v:VerificationErrorLoop" class="def">VerificationErrorLoop</a> <a href="Hackage-Security-Trusted.html#t:VerificationHistory">VerificationHistory</a></td><td class="doc"><p>The spec stipulates that if a verification error occurs during
 the check for updates, we must download new root information and
 start over. However, we limit how often we attempt this.</p><p>We record all verification errors that occurred before we gave up.</p></td></tr></table></div><div class="subs instances"><p id="control.i:VerificationError" class="caption collapser" onclick="toggleSection('i:VerificationError')">Instances</p><div id="section.i:VerificationError" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:VerificationError:Show:1" class="instance expander" onclick="toggleSection('i:id:VerificationError:Show:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> <a href="Hackage-Security-Trusted.html#t:VerificationError">VerificationError</a></span> <a href="src/Hackage-Security-Trusted-TCB.html#line-208" class="link">Source</a> <a href="#t:VerificationError" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:VerificationError:Show:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Hackage-Security-Trusted.html#t:VerificationError">VerificationError</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Hackage-Security-Trusted.html#t:VerificationError">VerificationError</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Hackage-Security-Trusted.html#t:VerificationError">VerificationError</a>] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:VerificationError:Exception:2" class="instance expander" onclick="toggleSection('i:id:VerificationError:Exception:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:Exception">Exception</a> <a href="Hackage-Security-Trusted.html#t:VerificationError">VerificationError</a></span> <a href="src/Hackage-Security-Trusted-TCB.html#line-210" class="link">Source</a> <a href="#t:VerificationError" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:VerificationError:Exception:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:toException">toException</a> :: <a href="Hackage-Security-Trusted.html#t:VerificationError">VerificationError</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:SomeException">SomeException</a> <a href="#v:toException" class="selflink">#</a></p><p class="src"><a href="#v:fromException">fromException</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:SomeException">SomeException</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Hackage-Security-Trusted.html#t:VerificationError">VerificationError</a> <a href="#v:fromException" class="selflink">#</a></p><p class="src"><a href="#v:displayException">displayException</a> :: <a href="Hackage-Security-Trusted.html#t:VerificationError">VerificationError</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:displayException" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:VerificationError:Pretty:3" class="instance expander" onclick="toggleSection('i:id:VerificationError:Pretty:3')"></span> <a href="Hackage-Security-Util-Pretty.html#t:Pretty">Pretty</a> <a href="Hackage-Security-Trusted.html#t:VerificationError">VerificationError</a></span> <a href="src/Hackage-Security-Trusted-TCB.html#line-219" class="link">Source</a> <a href="#t:VerificationError" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:VerificationError:Pretty:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:pretty">pretty</a> :: <a href="Hackage-Security-Trusted.html#t:VerificationError">VerificationError</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="src/Hackage-Security-Util-Pretty.html#pretty" class="link">Source</a> <a href="#v:pretty" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:RootUpdated" class="def">RootUpdated</a> <a href="src/Hackage-Security-Trusted-TCB.html#RootUpdated" class="link">Source</a> <a href="#t:RootUpdated" class="selflink">#</a></p><div class="doc"><p>Root metadata updated (as part of the normal update process)</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:RootUpdated" class="def">RootUpdated</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:RootUpdated" class="caption collapser" onclick="toggleSection('i:RootUpdated')">Instances</p><div id="section.i:RootUpdated" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:RootUpdated:Show:1" class="instance expander" onclick="toggleSection('i:id:RootUpdated:Show:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> <a href="Hackage-Security-Trusted.html#t:RootUpdated">RootUpdated</a></span> <a href="src/Hackage-Security-Trusted-TCB.html#line-209" class="link">Source</a> <a href="#t:RootUpdated" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:RootUpdated:Show:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Hackage-Security-Trusted.html#t:RootUpdated">RootUpdated</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Hackage-Security-Trusted.html#t:RootUpdated">RootUpdated</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Hackage-Security-Trusted.html#t:RootUpdated">RootUpdated</a>] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:RootUpdated:Exception:2" class="instance expander" onclick="toggleSection('i:id:RootUpdated:Exception:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:Exception">Exception</a> <a href="Hackage-Security-Trusted.html#t:RootUpdated">RootUpdated</a></span> <a href="src/Hackage-Security-Trusted-TCB.html#line-211" class="link">Source</a> <a href="#t:RootUpdated" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:RootUpdated:Exception:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:toException">toException</a> :: <a href="Hackage-Security-Trusted.html#t:RootUpdated">RootUpdated</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:SomeException">SomeException</a> <a href="#v:toException" class="selflink">#</a></p><p class="src"><a href="#v:fromException">fromException</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:SomeException">SomeException</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Hackage-Security-Trusted.html#t:RootUpdated">RootUpdated</a> <a href="#v:fromException" class="selflink">#</a></p><p class="src"><a href="#v:displayException">displayException</a> :: <a href="Hackage-Security-Trusted.html#t:RootUpdated">RootUpdated</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:displayException" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:RootUpdated:Pretty:3" class="instance expander" onclick="toggleSection('i:id:RootUpdated:Pretty:3')"></span> <a href="Hackage-Security-Util-Pretty.html#t:Pretty">Pretty</a> <a href="Hackage-Security-Trusted.html#t:RootUpdated">RootUpdated</a></span> <a href="src/Hackage-Security-Trusted-TCB.html#line-238" class="link">Source</a> <a href="#t:RootUpdated" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:RootUpdated:Pretty:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:pretty">pretty</a> :: <a href="Hackage-Security-Trusted.html#t:RootUpdated">RootUpdated</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="src/Hackage-Security-Util-Pretty.html#pretty" class="link">Source</a> <a href="#v:pretty" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:VerificationHistory" class="def">VerificationHistory</a> = [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> <a href="Hackage-Security-Trusted.html#t:RootUpdated">RootUpdated</a> <a href="Hackage-Security-Trusted.html#t:VerificationError">VerificationError</a>] <a href="src/Hackage-Security-Trusted-TCB.html#VerificationHistory" class="link">Source</a> <a href="#t:VerificationHistory" class="selflink">#</a></p></div><h1 id="g:3">Role verification</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:SignaturesVerified" class="def">SignaturesVerified</a> a <a href="src/Hackage-Security-Trusted-TCB.html#SignaturesVerified" class="link">Source</a> <a href="#t:SignaturesVerified" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:signaturesVerified" class="def">signaturesVerified</a> :: <a href="Hackage-Security-Trusted.html#t:SignaturesVerified">SignaturesVerified</a> a -&gt; a <a href="src/Hackage-Security-Trusted-TCB.html#signaturesVerified" class="link">Source</a> <a href="#v:signaturesVerified" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:verifyRole-39-" class="def">verifyRole'</a> <a href="src/Hackage-Security-Trusted-TCB.html#verifyRole%27" class="link">Source</a> <a href="#v:verifyRole-39-" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Hackage-Security-Server.html#t:HasHeader">HasHeader</a> a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> (<a href="Hackage-Security-Server.html#t:RoleSpec">RoleSpec</a> a)</td><td class="doc"><p>For signature validation</p></td></tr><tr><td class="src">-&gt; <a href="Hackage-Security-TUF-FileMap.html#t:TargetPath">TargetPath</a></td><td class="doc"><p>File source (for error messages)</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Hackage-Security-Server.html#t:FileVersion">FileVersion</a></td><td class="doc"><p>Previous version (if available)</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Clock.html#t:UTCTime">UTCTime</a></td><td class="doc"><p>Time now (if checking expiry)</p></td></tr><tr><td class="src">-&gt; <a href="Hackage-Security-Server.html#t:Signed">Signed</a> a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> <a href="Hackage-Security-Trusted.html#t:VerificationError">VerificationError</a> (<a href="Hackage-Security-Trusted.html#t:SignaturesVerified">SignaturesVerified</a> a)</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Role verification</p><p>NOTE: We throw an error when the version number _decreases_, but allow it
 to be the same. This is sufficient: the file number is there so that
 attackers cannot replay old files. It cannot protect against freeze attacks
 (that's what the expiry date is for), so &quot;replaying&quot; the same file is not
 a problem. If an attacker changes the contents of the file but not the
 version number we have an inconsistent situation, but this is not something
 we need to worry about: in this case the attacker will need to resign the
 file or otherwise the signature won't match, and if the attacker has
 compromised the key then he might just as well increase the version number
 and resign.</p><p>NOTE 2: We are not actually verifying the signatures _themselves_ here
 (we did that when we parsed the JSON). We are merely verifying the provenance
 of the keys.</p></div></div><div class="top"><p class="src"><a id="v:verifyFingerprints" class="def">verifyFingerprints</a> <a href="src/Hackage-Security-Trusted-TCB.html#verifyFingerprints" class="link">Source</a> <a href="#v:verifyFingerprints" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: [<a href="Hackage-Security-Server.html#t:KeyId">KeyId</a>]</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="Hackage-Security-Server.html#t:KeyThreshold">KeyThreshold</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="Hackage-Security-TUF-FileMap.html#t:TargetPath">TargetPath</a></td><td class="doc"><p>For error messages</p></td></tr><tr><td class="src">-&gt; <a href="Hackage-Security-Server.html#t:Signed">Signed</a> <a href="Hackage-Security-Server.html#t:Root">Root</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> <a href="Hackage-Security-Trusted.html#t:VerificationError">VerificationError</a> (<a href="Hackage-Security-Trusted.html#t:SignaturesVerified">SignaturesVerified</a> <a href="Hackage-Security-Server.html#t:Root">Root</a>)</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Variation on <code>verifyRole</code> that uses key IDs rather than keys</p><p>This is used during the bootstrap process.</p><p>See <a href="http://en.wikipedia.org/wiki/Public_key_fingerprint">http://en.wikipedia.org/wiki/Public_key_fingerprint</a>.</p></div></div><h1 id="g:4">Re-exports</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:StaticPtr" class="def">StaticPtr</a> a :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> <a href="#t:StaticPtr" class="selflink">#</a></p><div class="doc"><p>A reference to a value of type <code>a</code>.</p></div><div class="subs instances"><p id="control.i:StaticPtr" class="caption collapser" onclick="toggleSection('i:StaticPtr')">Instances</p><div id="section.i:StaticPtr" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:StaticPtr:IsStatic:1" class="instance expander" onclick="toggleSection('i:id:StaticPtr:IsStatic:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-StaticPtr.html#t:IsStatic">IsStatic</a> <a href="Hackage-Security-Trusted.html#t:StaticPtr">StaticPtr</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:StaticPtr:IsStatic:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:fromStaticPtr">fromStaticPtr</a> :: <a href="Hackage-Security-Trusted.html#t:StaticPtr">StaticPtr</a> a -&gt; <a href="Hackage-Security-Trusted.html#t:StaticPtr">StaticPtr</a> a <a href="#v:fromStaticPtr" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><h1 id="g:5">Derived functions</h1><div class="top"><p class="src"><a id="v:-60--36--36--62-" class="def">(&lt;$$&gt;)</a> :: <a href="Hackage-Security-Trusted.html#t:StaticPtr">StaticPtr</a> (a -&gt; b) -&gt; <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> a -&gt; <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> b <a href="src/Hackage-Security-Trusted.html#%3C%24%24%3E" class="link">Source</a> <a href="#v:-60--36--36--62-" class="selflink">#</a></p><div class="doc"><p>Apply a static function to a trusted argument</p></div></div><h2 id="g:6">Role verification</h2><div class="top"><p class="src"><span class="keyword">class</span> <a id="t:VerifyRole" class="def">VerifyRole</a> a <span class="keyword">where</span> <a href="src/Hackage-Security-Trusted.html#VerifyRole" class="link">Source</a> <a href="#t:VerifyRole" class="selflink">#</a></p><div class="subs minimal"><p class="caption">Minimal complete definition</p><p class="src"><a href="Hackage-Security-Trusted.html#v:verifyRole">verifyRole</a></p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a id="v:verifyRole" class="def">verifyRole</a> :: <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> <a href="Hackage-Security-Server.html#t:Root">Root</a> -&gt; <a href="Hackage-Security-TUF-FileMap.html#t:TargetPath">TargetPath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Hackage-Security-Server.html#t:FileVersion">FileVersion</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Clock.html#t:UTCTime">UTCTime</a> -&gt; <a href="Hackage-Security-Server.html#t:Signed">Signed</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> <a href="Hackage-Security-Trusted.html#t:VerificationError">VerificationError</a> (<a href="Hackage-Security-Trusted.html#t:SignaturesVerified">SignaturesVerified</a> a) <a href="src/Hackage-Security-Trusted.html#verifyRole" class="link">Source</a> <a href="#v:verifyRole" class="selflink">#</a></p></div><div class="subs instances"><p id="control.i:VerifyRole" class="caption collapser" onclick="toggleSection('i:VerifyRole')">Instances</p><div id="section.i:VerifyRole" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:VerifyRole:VerifyRole:1" class="instance expander" onclick="toggleSection('i:ic:VerifyRole:VerifyRole:1')"></span> <a href="Hackage-Security-Trusted.html#t:VerifyRole">VerifyRole</a> <a href="Hackage-Security-Server.html#t:Mirrors">Mirrors</a></span> <a href="src/Hackage-Security-Trusted.html#line-49" class="link">Source</a> <a href="#t:VerifyRole" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:VerifyRole:VerifyRole:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:verifyRole">verifyRole</a> :: <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> <a href="Hackage-Security-Server.html#t:Root">Root</a> -&gt; <a href="Hackage-Security-TUF-FileMap.html#t:TargetPath">TargetPath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Hackage-Security-Server.html#t:FileVersion">FileVersion</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Clock.html#t:UTCTime">UTCTime</a> -&gt; <a href="Hackage-Security-Server.html#t:Signed">Signed</a> <a href="Hackage-Security-Server.html#t:Mirrors">Mirrors</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> <a href="Hackage-Security-Trusted.html#t:VerificationError">VerificationError</a> (<a href="Hackage-Security-Trusted.html#t:SignaturesVerified">SignaturesVerified</a> <a href="Hackage-Security-Server.html#t:Mirrors">Mirrors</a>) <a href="src/Hackage-Security-Trusted.html#verifyRole" class="link">Source</a> <a href="#v:verifyRole" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:VerifyRole:VerifyRole:2" class="instance expander" onclick="toggleSection('i:ic:VerifyRole:VerifyRole:2')"></span> <a href="Hackage-Security-Trusted.html#t:VerifyRole">VerifyRole</a> <a href="Hackage-Security-Server.html#t:Snapshot">Snapshot</a></span> <a href="src/Hackage-Security-Trusted.html#line-46" class="link">Source</a> <a href="#t:VerifyRole" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:VerifyRole:VerifyRole:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:verifyRole">verifyRole</a> :: <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> <a href="Hackage-Security-Server.html#t:Root">Root</a> -&gt; <a href="Hackage-Security-TUF-FileMap.html#t:TargetPath">TargetPath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Hackage-Security-Server.html#t:FileVersion">FileVersion</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Clock.html#t:UTCTime">UTCTime</a> -&gt; <a href="Hackage-Security-Server.html#t:Signed">Signed</a> <a href="Hackage-Security-Server.html#t:Snapshot">Snapshot</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> <a href="Hackage-Security-Trusted.html#t:VerificationError">VerificationError</a> (<a href="Hackage-Security-Trusted.html#t:SignaturesVerified">SignaturesVerified</a> <a href="Hackage-Security-Server.html#t:Snapshot">Snapshot</a>) <a href="src/Hackage-Security-Trusted.html#verifyRole" class="link">Source</a> <a href="#v:verifyRole" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:VerifyRole:VerifyRole:3" class="instance expander" onclick="toggleSection('i:ic:VerifyRole:VerifyRole:3')"></span> <a href="Hackage-Security-Trusted.html#t:VerifyRole">VerifyRole</a> <a href="Hackage-Security-Server.html#t:Timestamp">Timestamp</a></span> <a href="src/Hackage-Security-Trusted.html#line-43" class="link">Source</a> <a href="#t:VerifyRole" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:VerifyRole:VerifyRole:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:verifyRole">verifyRole</a> :: <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> <a href="Hackage-Security-Server.html#t:Root">Root</a> -&gt; <a href="Hackage-Security-TUF-FileMap.html#t:TargetPath">TargetPath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Hackage-Security-Server.html#t:FileVersion">FileVersion</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Clock.html#t:UTCTime">UTCTime</a> -&gt; <a href="Hackage-Security-Server.html#t:Signed">Signed</a> <a href="Hackage-Security-Server.html#t:Timestamp">Timestamp</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> <a href="Hackage-Security-Trusted.html#t:VerificationError">VerificationError</a> (<a href="Hackage-Security-Trusted.html#t:SignaturesVerified">SignaturesVerified</a> <a href="Hackage-Security-Server.html#t:Timestamp">Timestamp</a>) <a href="src/Hackage-Security-Trusted.html#verifyRole" class="link">Source</a> <a href="#v:verifyRole" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:VerifyRole:VerifyRole:4" class="instance expander" onclick="toggleSection('i:ic:VerifyRole:VerifyRole:4')"></span> <a href="Hackage-Security-Trusted.html#t:VerifyRole">VerifyRole</a> <a href="Hackage-Security-Server.html#t:Root">Root</a></span> <a href="src/Hackage-Security-Trusted.html#line-40" class="link">Source</a> <a href="#t:VerifyRole" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:VerifyRole:VerifyRole:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:verifyRole">verifyRole</a> :: <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> <a href="Hackage-Security-Server.html#t:Root">Root</a> -&gt; <a href="Hackage-Security-TUF-FileMap.html#t:TargetPath">TargetPath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Hackage-Security-Server.html#t:FileVersion">FileVersion</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Clock.html#t:UTCTime">UTCTime</a> -&gt; <a href="Hackage-Security-Server.html#t:Signed">Signed</a> <a href="Hackage-Security-Server.html#t:Root">Root</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> <a href="Hackage-Security-Trusted.html#t:VerificationError">VerificationError</a> (<a href="Hackage-Security-Trusted.html#t:SignaturesVerified">SignaturesVerified</a> <a href="Hackage-Security-Server.html#t:Root">Root</a>) <a href="src/Hackage-Security-Trusted.html#verifyRole" class="link">Source</a> <a href="#v:verifyRole" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><h2 id="g:7">File info verification</h2><div class="top"><p class="src"><a id="v:trustedFileInfoEqual" class="def">trustedFileInfoEqual</a> :: <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> <a href="Hackage-Security-Server.html#t:FileInfo">FileInfo</a> -&gt; <a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a> <a href="Hackage-Security-Server.html#t:FileInfo">FileInfo</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Hackage-Security-Trusted.html#trustedFileInfoEqual" class="link">Source</a> <a href="#v:trustedFileInfoEqual" class="selflink">#</a></p><div class="doc"><p>Variation on <code><a href="Hackage-Security-Server.html#v:knownFileInfoEqual">knownFileInfoEqual</a></code> for <code><a href="Hackage-Security-Trusted.html#t:Trusted">Trusted</a></code> <code><a href="Hackage-Security-Server.html#t:FileInfo">FileInfo</a></code></p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>