From d521087a7d04f3dd5fdab03abe13994a3a3d6c9e Mon Sep 17 00:00:00 2001 From: James Crayne Date: Sun, 20 Apr 2014 01:56:48 -0400 Subject: working in remarks --- KeyRing.hs | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'KeyRing.hs') diff --git a/KeyRing.hs b/KeyRing.hs index 0522fdb..8d4f82d 100644 --- a/KeyRing.hs +++ b/KeyRing.hs @@ -330,11 +330,11 @@ usage (NotationDataPacket }) = Just u usage _ = Nothing -torSigOver +makeInducerSig :: Packet -> Packet -> Packet -> [SignatureSubpacket] -> SignatureOver -- torsig g topk wkun uid timestamp extras = todo -torSigOver topk wkun uid extras +makeInducerSig topk wkun uid extras = CertificationSignature (secretToPublic topk) uid (sigpackets 0x13 @@ -881,7 +881,7 @@ doImportG doDecrypt db m0 tag fname key = do let keyflags = keyFlags wkun (map packet $ flattenAllUids fname True uids) uid = UserIDPacket idstr -- sig_ov = fst $ torsig g (packet top) wkun uid timestamp keyflags - tor_ov = torSigOver (packet top) wkun uid keyflags + tor_ov = makeInducerSig (packet top) wkun uid keyflags sig_ov <- pgpSign (Message [wkun]) tor_ov SHA1 @@ -1320,7 +1320,24 @@ runKeyRing operation = do try' externals_ret $ \(db,report_externals) -> do - db <- let perform kd (InducerSignature uid subpaks) = error "todo" + db <- let perform kd (InducerSignature uid subpaks) = + -- makeInducerSig (keyPacket kd) wkun (UserIDPacket uid) subpaks + -- pgpSign + -- build keydata from pgpSign result + error "todo" + -- NOTEs + -- +{- +makeInducerSig + :: Packet + -> Packet -> Packet -> [SignatureSubpacket] -> SignatureOver +makeInducerSig topk wkun uid extras + = CertificationSignature (secretToPublic topk) + uid + (sigpackets 0x13 + subpackets + subpackets_unh) +-} in Traversable.mapM (\kd -> foldM perform kd (kManip operation rt kd)) db {- -- cgit v1.2.3