From 43478c909db3efb9ea1f7ab1942c92c46026f869 Mon Sep 17 00:00:00 2001 From: joe Date: Fri, 13 Dec 2013 01:48:50 -0500 Subject: Updated to patched OpenPGP with ecc_curve fields --- kiki.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kiki.hs b/kiki.hs index 22000d0..789bc07 100644 --- a/kiki.hs +++ b/kiki.hs @@ -23,7 +23,7 @@ import Control.Monad import qualified Text.Show.Pretty as PP import Text.PrettyPrint as PP hiding ((<>)) import Data.List -import Data.OpenPGP.CryptoAPI +import Data.OpenPGP.CryptoAPI (verify,fingerprint,sign,decryptSecretKey) import Data.Ord import Data.Maybe import Data.Bits @@ -236,10 +236,13 @@ getPackets = do Left (_,_,_) -> return [] +instance Default S.ByteString where def = S.empty + secretToPublic pkt@(SecretKeyPacket {}) = PublicKeyPacket { version = version pkt , timestamp = timestamp pkt , key_algorithm = key_algorithm pkt + , ecc_curve = def , key = let seckey = key pkt pubs = public_key_fields (key_algorithm pkt) in filter (\(k,v) -> k `elem` pubs) seckey @@ -844,6 +847,7 @@ readKeyFromFile False "PEM" fname = do { version = 4 , timestamp = toEnum (fromEnum timestamp) , key_algorithm = RSA + , ecc_curve = def , key = [ -- public fields... ('n',rsaN rsa) ,('e',rsaE rsa) -- cgit v1.2.3