summaryrefslogtreecommitdiff
path: root/KeyRing.hs
diff options
context:
space:
mode:
Diffstat (limited to 'KeyRing.hs')
-rw-r--r--KeyRing.hs21
1 files changed, 20 insertions, 1 deletions
diff --git a/KeyRing.hs b/KeyRing.hs
index 532acb8..cbbbf33 100644
--- a/KeyRing.hs
+++ b/KeyRing.hs
@@ -298,6 +298,20 @@ instance ASN1Object PKCS8_RSAPublicKey where
298 fromASN1 _ = 298 fromASN1 _ =
299 Left "fromASN1: RSAPublicKey: unexpected format" 299 Left "fromASN1: RSAPublicKey: unexpected format"
300 300
301{-
302RSAPrivateKey ::= SEQUENCE {
303 version Version,
304 modulus INTEGER, -- n
305 publicExponent INTEGER, -- e
306 privateExponent INTEGER, -- d
307 prime1 INTEGER, -- p
308 prime2 INTEGER, -- q
309 exponent1 INTEGER, -- d mod (p1) -- ?? d mod (p-1)
310 exponent2 INTEGER, -- d mod (q-1)
311 coefficient INTEGER, -- (inverse of q) mod p
312 otherPrimeInfos OtherPrimeInfos OPTIONAL
313 }
314-}
301data RSAPrivateKey = RSAPrivateKey 315data RSAPrivateKey = RSAPrivateKey
302 { rsaN :: MPI 316 { rsaN :: MPI
303 , rsaE :: MPI 317 , rsaE :: MPI
@@ -2112,7 +2126,12 @@ merge db filename (Message ps) = merge_ db filename qs
2112 updateTrust _ _ (pre,t) p = (pre,Map.insert filename p t) -- secret 2126 updateTrust _ _ (pre,t) p = (pre,Map.insert filename p t) -- secret
2113 2127
2114 2128
2115 2129{-
2130onionName :: KeyData -> (SockAddr,L.ByteString)
2131onionName kd = (addr,name)
2132 where
2133 (addr,(name:_,_)) = getHostnames kd
2134-}
2116 2135
2117merge_ :: KeyDB -> FilePath -> [(Packet,Packet,(Packet,Map.Map FilePath Packet))] 2136merge_ :: KeyDB -> FilePath -> [(Packet,Packet,(Packet,Map.Map FilePath Packet))]
2118 -> KeyDB 2137 -> KeyDB