summaryrefslogtreecommitdiff
path: root/src/Main.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2019-05-05 13:37:01 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2019-05-06 21:05:50 +0200
commitdc67ee394205802d30d888387dffa7f588099217 (patch)
treef1fa51f2bb8b68c080d2430a07142d92a1035f30 /src/Main.hs
parent637e70e9d61616e16cb845100538fe2cf4c7fb29 (diff)
Signed identities using ED25519
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 017d70d..9f6cade 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -12,6 +12,7 @@ import System.IO.Error
import Identity
import Network
+import PubKey
import Storage
@@ -23,7 +24,9 @@ main = do
putStr "Name: "
hFlush stdout
name <- T.getLine
- let base = Identity name Nothing
+ (secret, public) <- generateKeys st
+
+ base <- sign secret =<< wrappedStore st (Identity name Nothing public)
Right h <- replaceHead base (Left (st, "identity"))
return h
let sidentity = wrappedLoad (headRef idhead) :: Stored Identity