diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2020-12-29 21:39:19 +0100 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2020-12-30 21:47:58 +0100 |
commit | cc132e005f974577c2ff782add7df8247c4eb541 (patch) | |
tree | 8fde890ef80e33fc1b4b81d4176d642157a29a12 /src/Pairing.hs | |
parent | b2d1f57098ae12a22fe7511eb765c39158600d17 (diff) |
Discovery service
Diffstat (limited to 'src/Pairing.hs')
-rw-r--r-- | src/Pairing.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Pairing.hs b/src/Pairing.hs index 9af33c7..460dd55 100644 --- a/src/Pairing.hs +++ b/src/Pairing.hs @@ -90,7 +90,7 @@ instance PairingResult a => Service (PairingService a) where (NoPairing, _) -> return () (OurRequest nonce, PairingResponse pnonce) -> do - peer <- asks $ svcPeer + peer <- asks $ svcPeerIdentity self <- maybe (throwError "failed to validate own identity") return . validateIdentity . lsIdentity . fromStored =<< svcGetLocal pairingHookResponse $ confirmationNumber $ nonceDigest self peer nonce pnonce @@ -118,7 +118,7 @@ instance PairingResult a => Service (PairingService a) where replyPacket PairingDecline (PeerRequest nonce dgst, PairingRequestNonce pnonce) -> do - peer <- asks $ svcPeer + peer <- asks $ svcPeerIdentity self <- maybe (throwError "failed to verify own identity") return . validateIdentity . lsIdentity . fromStored =<< svcGetLocal if dgst == nonceDigest peer self pnonce BA.empty |