summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2014-05-11 00:48:35 -0400
committerjoe <joe@jerkface.net>2014-05-11 00:48:35 -0400
commit0b0c24da3fc2389dbf92f2b105b588763916971e (patch)
tree2e572ba043a150e2d0007d627b36726f86c36a27
parent91efbba981f62b60514e6f250907fb654c622c79 (diff)
import certificate blobs as 'x509cert@' binary annotations.
-rw-r--r--KeyRing.hs9
1 files changed, 8 insertions, 1 deletions
diff --git a/KeyRing.hs b/KeyRing.hs
index 7e9fa17..8717e03 100644
--- a/KeyRing.hs
+++ b/KeyRing.hs
@@ -1519,7 +1519,14 @@ doImport doDecrypt db (fname,subspec,ms,_) = do
1519 if (not (null tailms) || null m0) 1519 if (not (null tailms) || null m0)
1520 then return $ AmbiguousKeySpec fname 1520 then return $ AmbiguousKeySpec fname
1521 else do 1521 else do
1522 r <- doImportG doDecrypt db m0 [mkUsage tag] fname key 1522 let kk = keykey key
1523 cs = filter (\c -> kk==keykey (pcertKey c)) certs
1524 blobs = map mkCertNotation $ nub $ map pcertBlob cs
1525 mkCertNotation bs = NotationDataPacket
1526 { human_readable = False
1527 , notation_name = "x509cert@"
1528 , notation_value = Char8.unpack bs }
1529 r <- doImportG doDecrypt db m0 (mkUsage tag:blobs) fname key
1523 try r $ \(db',report') -> do 1530 try r $ \(db',report') -> do
1524 return $ KikiSuccess (db',report++report') 1531 return $ KikiSuccess (db',report++report')
1525 1532