From 488483a6be927695129b7086635d5f0774afabd8 Mon Sep 17 00:00:00 2001 From: "Richard T. Carback III" <rick.carback@gmail.com> Date: Thu, 8 Sep 2022 15:10:21 +0000 Subject: [PATCH] Update golds, make sure the basice2e script is properly using --accept-channel --- basice2e/clients.goldoutput/client44.txt | 2 ++ basice2e/clients.goldoutput/client45.txt | 2 -- basice2e/clients.goldoutput/client46.txt | 4 ++++ basice2e/run.sh | 18 ++++++++---------- 4 files changed, 14 insertions(+), 12 deletions(-) create mode 100644 basice2e/clients.goldoutput/client46.txt diff --git a/basice2e/clients.goldoutput/client44.txt b/basice2e/clients.goldoutput/client44.txt index 490242c..9c8a179 100644 --- a/basice2e/clients.goldoutput/client44.txt +++ b/basice2e/clients.goldoutput/client44.txt @@ -1,3 +1,5 @@ + Message received: Hello from David44 to myself, without E2E Encryption +Received 0 Received 1 Sent: Hello from David44 to myself, without E2E Encryption diff --git a/basice2e/clients.goldoutput/client45.txt b/basice2e/clients.goldoutput/client45.txt index 3504841..d027c54 100644 --- a/basice2e/clients.goldoutput/client45.txt +++ b/basice2e/clients.goldoutput/client45.txt @@ -1,4 +1,3 @@ -Adding Message received: Hello, 4 Message received: Hello, 4 Message received: Hello, 4 @@ -81,4 +80,3 @@ Sent: Hello, 5 Sent: Hello, 5 Sent: Hello, 5 Sent: Hello, 5 -WARNING: unsafe channel creation enabled diff --git a/basice2e/clients.goldoutput/client46.txt b/basice2e/clients.goldoutput/client46.txt new file mode 100644 index 0000000..7117098 --- /dev/null +++ b/basice2e/clients.goldoutput/client46.txt @@ -0,0 +1,4 @@ +Adding +Received 0 +Received 0 +WARNING: unsafe channel creation enabled diff --git a/basice2e/run.sh b/basice2e/run.sh index 7255654..5d02293 100755 --- a/basice2e/run.sh +++ b/basice2e/run.sh @@ -376,33 +376,31 @@ echo "$CLIENTCMD -- $PIDVAL" wait $PIDVAL # NOTE: client45 is a precan user (see runclients), so we skip to 46 here. -CLIENTCMD="timeout 360s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client46.log -s blob46 --writeContact $CLIENTOUT/matt46-contact.bin --destfile $CLIENTOUT/matt46-contact.bin --unsafe-channel-creation --send-auth-request --sendCount 0 --receiveCount 0" +CLIENTCMD="timeout 360s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client46.log -s blob46 --writeContact $CLIENTOUT/matt46-contact.bin --destfile $CLIENTOUT/david44-contact.bin --unsafe-channel-creation --send-auth-request --sendCount 0 --receiveCount 0" eval $CLIENTCMD >> $CLIENTOUT/client46.txt & PIDVAL2=$! echo "$CLIENTCMD -- $PIDVAL" +wait $PIDVAL2 -TMPID=$(cat $CLIENTOUT/client44.log | grep -a "User\:" | awk -F' ' '{print $5}') -DAVIDID=${TMPID} -echo "DAVID ID: $DAVIDID" - -CLIENTCMD="timeout 360s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client46.log -s blob46 --delete-sent-requests --sendCount 0 --receiveCount 0 --accept-channel" +CLIENTCMD="timeout 360s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client46.log -s blob46 --delete-sent-requests --sendCount 0 --receiveCount 0" eval $CLIENTCMD >> $CLIENTOUT/client46.txt & PIDVAL2=$! echo "$CLIENTCMD -- $PIDVAL" +wait $PIDVAL2 # This is tricky -- we've deleted the request without having received the # confirmation, so now the receiver attempts to accept the channel while the -# sender (without confirmation) sends to us without an auth channel. +# sender (without confirmation) sends to them without an auth channel. CLIENTCMD="timeout 360s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client44.log -s blob44 --destfile $CLIENTOUT/matt46-contact.bin --sendCount 0 --receiveCount 0 --accept-channel" eval $CLIENTCMD >> $CLIENTOUT/client44.txt & PIDVAL=$! echo "$CLIENTCMD -- $PIDVAL" -wait $PIDVAL -CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client46.log -s blob46 --destid b64:$DAVIDID --sendCount 5 --receiveCount 5 -m \"Hello from David, with E2E Encryption\"" +CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client46.log -s blob46 --destfile $CLIENTOUT/david44-contact.bin --sendCount 5 --receiveCount 5 -m \"Hello from David, with E2E Encryption\"" eval $CLIENTCMD >> $CLIENTOUT/client46.txt || true & PIDVAL2=$! echo "$CLIENTCMD -- $PIDVAL" echo "NOTE: The command above causes an EXPECTED failure to confirm authentication channel!" +wait $PIDVAL wait $PIDVAL2 ############################################################################### @@ -1052,7 +1050,7 @@ CLIENT111ID=${TMPID} echo "CLIENT 111 ID: $CLIENT111ID" # Client 110 will now wait for client 111's E2E Auth channel request and confirm -CLIENTCMD="timeout 360s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client110.log -s blob110 --destfile $CLIENTOUT/client111-contact.bin --sendCount 0 --receiveCount 0 --accept-channel +CLIENTCMD="timeout 360s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client110.log -s blob110 --destfile $CLIENTOUT/client111-contact.bin --sendCount 0 --receiveCount 0 --accept-channel" eval $CLIENTCMD >> $CLIENTOUT/client110.txt & PIDVAL1=$! echo "$CLIENTCMD -- $PIDVAL1" -- GitLab