diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms.hs b/lib/Transforms.hs index f3cd5e3..8a1da73 100644 --- a/lib/Transforms.hs +++ b/lib/Transforms.hs | |||
@@ -79,8 +79,7 @@ instance ASN1Object RSAPublicKey where | |||
79 | fromASN1 (Start Sequence:IntVal n:IntVal e:End Sequence:xs) = | 79 | fromASN1 (Start Sequence:IntVal n:IntVal e:End Sequence:xs) = |
80 | Right (RSAKey (MPI n) (MPI e), xs) | 80 | Right (RSAKey (MPI n) (MPI e), xs) |
81 | 81 | ||
82 | fromASN1 _ = | 82 | fromASN1 _ = Left "fromASN1: RSAPublicKey: unexpected format" |
83 | Left "fromASN1: RSAPublicKey: unexpected format" | ||
84 | 83 | ||
85 | 84 | ||
86 | -- | This type is used to describe events triggered by 'runKeyRing'. In | 85 | -- | This type is used to describe events triggered by 'runKeyRing'. In |
@@ -778,7 +777,7 @@ selfAuthenticated k kd (UidString str) = | |||
778 | and [ uid_topdomain parsed == "onion" | 777 | and [ uid_topdomain parsed == "onion" |
779 | , uid_realname parsed `elem` ["","Anonymous"] | 778 | , uid_realname parsed `elem` ["","Anonymous"] |
780 | , uid_user parsed == "root" | 779 | , uid_user parsed == "root" |
781 | , fmap (match . fst) (lookup (packet k) torbindings) == Just True | 780 | , fmap match torSubdom == Just True |
782 | ] | 781 | ] |
783 | where | 782 | where |
784 | parsed = parseUID str | 783 | parsed = parseUID str |
@@ -786,6 +785,7 @@ selfAuthenticated k kd (UidString str) = | |||
786 | len = T.length (uid_subdomain parsed) | 785 | len = T.length (uid_subdomain parsed) |
787 | subdom0 = L.fromChunks [encodeUtf8 (uid_subdomain parsed)] | 786 | subdom0 = L.fromChunks [encodeUtf8 (uid_subdomain parsed)] |
788 | subdom = Char8.unpack subdom0 | 787 | subdom = Char8.unpack subdom0 |
788 | torSubdom = fst <$> lookup (packet k) torbindings | ||
789 | torbindings = getTorKeys (map packet $ flattenTop "" True kd) | 789 | torbindings = getTorKeys (map packet $ flattenTop "" True kd) |
790 | 790 | ||
791 | getTorKeys :: [Packet] -> [(Packet, (String, Packet))] | 791 | getTorKeys :: [Packet] -> [(Packet, (String, Packet))] |