summaryrefslogtreecommitdiff
path: root/KeyRing.hs
diff options
context:
space:
mode:
Diffstat (limited to 'KeyRing.hs')
-rw-r--r--KeyRing.hs16
1 files changed, 11 insertions, 5 deletions
diff --git a/KeyRing.hs b/KeyRing.hs
index 49a6069..a15fdeb 100644
--- a/KeyRing.hs
+++ b/KeyRing.hs
@@ -1360,11 +1360,13 @@ performManipulations doDecrypt operation rt wk = do
1360 flip (maybe $ return NoWorkingKey) wk $ \wk' -> do 1360 flip (maybe $ return NoWorkingKey) wk $ \wk' -> do
1361 wkun' <- doDecrypt wk' 1361 wkun' <- doDecrypt wk'
1362 try wkun' $ \wkun -> do 1362 try wkun' $ \wkun -> do
1363 let sigOver = makeInducerSig (keyPacket kd) wkun (UserIDPacket uid) subpaks 1363 let flgs = if keykey (keyPacket kd) == keykey wkun
1364 sigr <- pgpSign (Message [wkun]) sigOver SHA1 (fingerprint wkun) 1364 then keyFlags0 (keyPacket kd) (map (\(x,_,_)->x) selfsigs)
1365 let f ::([SigAndTrust],OriginMap) -> ([SigAndTrust],OriginMap) 1365 else []
1366 f x = ( map ( (,Map.empty) . toMappedPacket om) (additional sigr) ++ fst x 1366 sigOver = makeInducerSig (keyPacket kd)
1367 , om `Map.union` snd x ) 1367 wkun
1368 (UserIDPacket uid)
1369 $ flgs ++ subpaks
1368 om = Map.singleton "--autosign" (origin p (-1)) where p = UserIDPacket uid 1370 om = Map.singleton "--autosign" (origin p (-1)) where p = UserIDPacket uid
1369 toMappedPacket om p = (mappedPacket "" p) {locations=om} 1371 toMappedPacket om p = (mappedPacket "" p) {locations=om}
1370 selfsigs = filter (\(sig,v,whosign) -> isJust (v >> Just wkun >>= guard 1372 selfsigs = filter (\(sig,v,whosign) -> isJust (v >> Just wkun >>= guard
@@ -1388,6 +1390,10 @@ performManipulations doDecrypt operation rt wk = do
1388 new_sig <- maybeToList new_sig 1390 new_sig <- maybeToList new_sig
1389 guard (null $ selfsigs) 1391 guard (null $ selfsigs)
1390 signatures_over new_sig 1392 signatures_over new_sig
1393 sigr <- pgpSign (Message [wkun]) sigOver SHA1 (fingerprint wkun)
1394 let f ::([SigAndTrust],OriginMap) -> ([SigAndTrust],OriginMap)
1395 f x = ( map ( (,Map.empty) . toMappedPacket om) (additional sigr) ++ fst x
1396 , om `Map.union` snd x )
1391 return $ KikiSuccess $ kd { rentryUids = Map.adjust f uid (rentryUids kd) } 1397 return $ KikiSuccess $ kd { rentryUids = Map.adjust f uid (rentryUids kd) }
1392 1398
1393initializeMissingPEMFiles :: 1399initializeMissingPEMFiles ::