summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Crayne <jim.crayne@gmail.com>2014-04-20 01:56:48 -0400
committerJames Crayne <jim.crayne@gmail.com>2014-04-20 01:56:48 -0400
commitd521087a7d04f3dd5fdab03abe13994a3a3d6c9e (patch)
tree5ba1681aa7aa0e7498ed2f172bbf4e147306f68c
parent0a9b3df4782d26b2bd542d5234545b64b04099b0 (diff)
working in remarks
-rw-r--r--KeyRing.hs25
-rw-r--r--kiki.hs2
2 files changed, 22 insertions, 5 deletions
diff --git a/KeyRing.hs b/KeyRing.hs
index 0522fdb..8d4f82d 100644
--- a/KeyRing.hs
+++ b/KeyRing.hs
@@ -330,11 +330,11 @@ usage (NotationDataPacket
330 }) = Just u 330 }) = Just u
331usage _ = Nothing 331usage _ = Nothing
332 332
333torSigOver 333makeInducerSig
334 :: Packet 334 :: Packet
335 -> Packet -> Packet -> [SignatureSubpacket] -> SignatureOver 335 -> Packet -> Packet -> [SignatureSubpacket] -> SignatureOver
336-- torsig g topk wkun uid timestamp extras = todo 336-- torsig g topk wkun uid timestamp extras = todo
337torSigOver topk wkun uid extras 337makeInducerSig topk wkun uid extras
338 = CertificationSignature (secretToPublic topk) 338 = CertificationSignature (secretToPublic topk)
339 uid 339 uid
340 (sigpackets 0x13 340 (sigpackets 0x13
@@ -881,7 +881,7 @@ doImportG doDecrypt db m0 tag fname key = do
881 let keyflags = keyFlags wkun (map packet $ flattenAllUids fname True uids) 881 let keyflags = keyFlags wkun (map packet $ flattenAllUids fname True uids)
882 uid = UserIDPacket idstr 882 uid = UserIDPacket idstr
883 -- sig_ov = fst $ torsig g (packet top) wkun uid timestamp keyflags 883 -- sig_ov = fst $ torsig g (packet top) wkun uid timestamp keyflags
884 tor_ov = torSigOver (packet top) wkun uid keyflags 884 tor_ov = makeInducerSig (packet top) wkun uid keyflags
885 sig_ov <- pgpSign (Message [wkun]) 885 sig_ov <- pgpSign (Message [wkun])
886 tor_ov 886 tor_ov
887 SHA1 887 SHA1
@@ -1320,7 +1320,24 @@ runKeyRing operation = do
1320 1320
1321 try' externals_ret $ \(db,report_externals) -> do 1321 try' externals_ret $ \(db,report_externals) -> do
1322 1322
1323 db <- let perform kd (InducerSignature uid subpaks) = error "todo" 1323 db <- let perform kd (InducerSignature uid subpaks) =
1324 -- makeInducerSig (keyPacket kd) wkun (UserIDPacket uid) subpaks
1325 -- pgpSign
1326 -- build keydata from pgpSign result
1327 error "todo"
1328 -- NOTEs
1329 --
1330{-
1331makeInducerSig
1332 :: Packet
1333 -> Packet -> Packet -> [SignatureSubpacket] -> SignatureOver
1334makeInducerSig topk wkun uid extras
1335 = CertificationSignature (secretToPublic topk)
1336 uid
1337 (sigpackets 0x13
1338 subpackets
1339 subpackets_unh)
1340-}
1324 in Traversable.mapM (\kd -> foldM perform kd (kManip operation rt kd)) db 1341 in Traversable.mapM (\kd -> foldM perform kd (kManip operation rt kd)) db
1325 1342
1326{- 1343{-
diff --git a/kiki.hs b/kiki.hs
index 098ed98..6b67449 100644
--- a/kiki.hs
+++ b/kiki.hs
@@ -1421,7 +1421,7 @@ main = do
1421 1421
1422 signSelfAuthTorKeys' selfkey keys grip mainpubkey (uid:xs') = do 1422 signSelfAuthTorKeys' selfkey keys grip mainpubkey (uid:xs') = do
1423 new_sig <- let wkun = fromJust selfkey 1423 new_sig <- let wkun = fromJust selfkey
1424 tor_ov = torSigOver mainpubkey wkun uid flgs 1424 tor_ov = makeInducerSig mainpubkey wkun uid flgs
1425 in pgpSign (Message [wkun]) 1425 in pgpSign (Message [wkun])
1426 tor_ov 1426 tor_ov
1427 SHA1 1427 SHA1