diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2019-05-17 23:43:14 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2019-05-20 22:20:13 +0200 |
commit | 75cf4c130cc21afd4d569ce0291c2656de162908 (patch) | |
tree | 88c216d183f59da1ec9a55d773411c4649d5ec43 /src/Identity.hs | |
parent | f609499402160aa908e6435b8a61f7cb1f258cfe (diff) |
Encrypted channels negotiated with DH
Diffstat (limited to 'src/Identity.hs')
-rw-r--r-- | src/Identity.hs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Identity.hs b/src/Identity.hs index 07356d8..c1561b6 100644 --- a/src/Identity.hs +++ b/src/Identity.hs @@ -15,15 +15,17 @@ data IdentityData = Identity , idPrev :: Maybe (Stored Identity) , idOwner :: Maybe (Stored Identity) , idKeyIdentity :: Stored PublicKey + , idKeyMessage :: Stored PublicKey } deriving (Show) -emptyIdentity :: Stored PublicKey -> IdentityData -emptyIdentity key = Identity +emptyIdentity :: Stored PublicKey -> Stored PublicKey -> IdentityData +emptyIdentity key kmsg = Identity { idName = Nothing , idPrev = Nothing , idOwner = Nothing , idKeyIdentity = key + , idKeyMessage = kmsg } instance Storable IdentityData where @@ -32,9 +34,11 @@ instance Storable IdentityData where storeMbRef "prev" $ idPrev idt storeMbRef "owner" $ idOwner idt storeRef "key-id" $ idKeyIdentity idt + storeRef "key-msg" $ idKeyMessage idt load' = loadRec $ Identity <$> loadMbText "name" <*> loadMbRef "prev" <*> loadMbRef "owner" <*> loadRef "key-id" + <*> loadRef "key-msg" |