@@ -8,7 +8,7 @@ import AgentTests.ConnectionRequestTests (contactConnRequest, invConnRequest)
88import AgentTests.EqInstances ()
99import Control.Concurrent.STM
1010import Control.Monad.Except
11- import Simplex.Messaging.Agent.Protocol (AgentErrorType (.. ), ConnectionMode (.. ), LinkKey (.. ), SMPAgentError (.. ), linkUserData , supportedSMPAgentVRange )
11+ import Simplex.Messaging.Agent.Protocol (AgentErrorType (.. ), ConnectionMode (.. ), LinkKey (.. ), SConnectionMode ( .. ), SMPAgentError (.. ), linkUserData , supportedSMPAgentVRange )
1212import qualified Simplex.Messaging.Crypto as C
1313import qualified Simplex.Messaging.Crypto.ShortLink as SL
1414import Test.Hspec hiding (fit , it )
@@ -79,7 +79,7 @@ testUpdateContactShortLink = do
7979 Right (fd, _ud) <- runExceptT $ SL. encryptLinkData g k linkData
8080 -- encrypt updated user data
8181 let updatedUserData = " updated user data"
82- signed = SL. encodeSignUserData (snd sigKeys) supportedSMPAgentVRange updatedUserData
82+ signed = SL. encodeSignUserData SCMContact (snd sigKeys) supportedSMPAgentVRange updatedUserData
8383 Right ud' <- runExceptT $ SL. encryptUserData g k signed
8484 -- decrypt
8585 Right (connReq, connData') <- pure $ SL. decryptLinkData linkKey k (fd, ud')
@@ -114,7 +114,7 @@ testContactShortLinkBadSignature = do
114114 let updatedUserData = " updated user data"
115115 -- another signature key
116116 (_, pk) <- atomically $ C. generateKeyPair @ 'C.Ed25519 g
117- let signed = SL. encodeSignUserData pk supportedSMPAgentVRange updatedUserData
117+ let signed = SL. encodeSignUserData SCMContact pk supportedSMPAgentVRange updatedUserData
118118 Right ud' <- runExceptT $ SL. encryptUserData g k signed
119119 -- decryption fails
120120 SL. decryptLinkData @ 'CMContact linkKey k (fd, ud')
0 commit comments