-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
One way key update #314
One way key update #314
Conversation
OK but I still think it would be good to add an argument to |
Done. But would you check |
With QuickCheck the canonical way is to put Arbitrary instances as parameters to the properties, so that generated values are displayed in case of test failure. prop_handshake_keyupdate :: KeyUpdateRequest -> KeyUpdateRequest -> Property
prop_handshake_keyupdate reqClient reqServer = monadicIO $ do
params <- pick arbitraryPairParams
let possible = isVersionEnabled TLS13 params
runTLSPipeN 3 params (tlsServer possible) (tlsClient possible)
where tlsServer possible ctx queue = do
handshake ctx
d0 <- recvDataNonNull ctx
sent <- updateKey ctx reqServer
possible `assertEq` sent
d1 <- recvDataNonNull ctx
d2 <- recvDataNonNull ctx
writeChan queue [d0,d1,d2]
tlsClient possible queue ctx = do
handshake ctx
d0 <- readChan queue
sendData ctx (L.fromChunks [d0])
d1 <- readChan queue
sendData ctx (L.fromChunks [d1])
sent <- updateKey ctx reqClient
possible `assertEq` sent
d2 <- readChan queue
sendData ctx (L.fromChunks [d2])
bye ctx But we don't use |
@ocheron Thank you for your explanation. tls-debug: done. Ready for merging? |
I will merget this. Please register another issue if necessary. |
c79ab55
to
bf83458
Compare
Merged. |
This should fix #311.