diff --git a/basice2e/clients.goldoutput/client601.txt b/basice2e/clients.goldoutput/client601.txt new file mode 100644 index 0000000000000000000000000000000000000000..7aef7b8e0779b743b809a5b6986cf67031e3383f --- /dev/null +++ b/basice2e/clients.goldoutput/client601.txt @@ -0,0 +1,27 @@ + +Message received: Hello from Ben602, with E2E Encryption +Message received: Hello from Ben602, with E2E Encryption +Message received: Hello from Ben602, with E2E Encryption +Message received: Hello from Ben602, with E2E Encryption +Message received: Hello from Ben602, with E2E Encryption +Message received: Hello from Ben602, with E2E Encryption +Message received: Hello from Ben602, with E2E Encryption +Message received: Hello from Ben602, with E2E Encryption +Message received: Hello from Ben602, with E2E Encryption +Message received: Hello from Ben602, with E2E Encryption +Message received: Hello from Rick601 to myself, without E2E Encryption +Received 0 +Received 1 +Received 5 +Received 5 +Sent: Hello from Rick601 to myself, without E2E Encryption +Sent: Hello from Rick601, with E2E Encryption +Sent: Hello from Rick601, with E2E Encryption +Sent: Hello from Rick601, with E2E Encryption +Sent: Hello from Rick601, with E2E Encryption +Sent: Hello from Rick601, with E2E Encryption +Sent: Hello from Rick601, with E2E Encryption +Sent: Hello from Rick601, with E2E Encryption +Sent: Hello from Rick601, with E2E Encryption +Sent: Hello from Rick601, with E2E Encryption +Sent: Hello from Rick601, with E2E Encryption diff --git a/basice2e/clients.goldoutput/client602.txt b/basice2e/clients.goldoutput/client602.txt new file mode 100644 index 0000000000000000000000000000000000000000..906185c1ba22a94ad88670546318a2c8dc8dcc1c --- /dev/null +++ b/basice2e/clients.goldoutput/client602.txt @@ -0,0 +1,25 @@ +Adding +Message received: Hello from Rick601, with E2E Encryption +Message received: Hello from Rick601, with E2E Encryption +Message received: Hello from Rick601, with E2E Encryption +Message received: Hello from Rick601, with E2E Encryption +Message received: Hello from Rick601, with E2E Encryption +Message received: Hello from Rick601, with E2E Encryption +Message received: Hello from Rick601, with E2E Encryption +Message received: Hello from Rick601, with E2E Encryption +Message received: Hello from Rick601, with E2E Encryption +Message received: Hello from Rick601, with E2E Encryption +Received 0 +Received 5 +Received 5 +Sent: Hello from Ben602, with E2E Encryption +Sent: Hello from Ben602, with E2E Encryption +Sent: Hello from Ben602, with E2E Encryption +Sent: Hello from Ben602, with E2E Encryption +Sent: Hello from Ben602, with E2E Encryption +Sent: Hello from Ben602, with E2E Encryption +Sent: Hello from Ben602, with E2E Encryption +Sent: Hello from Ben602, with E2E Encryption +Sent: Hello from Ben602, with E2E Encryption +Sent: Hello from Ben602, with E2E Encryption +WARNING: unsafe channel creation enabled diff --git a/basice2e/gateway-1.yaml b/basice2e/gateway-1.yaml index 7b66bb1c1b5efea590ca1751d689265c0c2e3ca2..7f8256f8b8994493beb72f6ee86d72639e1f01cc 100644 --- a/basice2e/gateway-1.yaml +++ b/basice2e/gateway-1.yaml @@ -42,4 +42,5 @@ cmixCertPath: "../keys/cmix.rip.crt" devMode: true +minRegisteredNodes: 0 # === END YAML diff --git a/basice2e/gateway-2.yaml b/basice2e/gateway-2.yaml index 7ea7802ef7a38dcd72672eae4b4252b4d639a3db..68de67f23c091ee0292e7e5394e1393c92da866f 100644 --- a/basice2e/gateway-2.yaml +++ b/basice2e/gateway-2.yaml @@ -42,4 +42,5 @@ cmixCertPath: "../keys/cmix.rip.crt" devMode: true +minRegisteredNodes: 0 # === END YAML diff --git a/basice2e/gateway-3.yaml b/basice2e/gateway-3.yaml index 406c15caf7f0313613f5726f64d8ebece49d48a4..8a45339ff576d9aef9b4b416d1445f33833adf62 100644 --- a/basice2e/gateway-3.yaml +++ b/basice2e/gateway-3.yaml @@ -42,4 +42,5 @@ cmixCertPath: "../keys/cmix.rip.crt" devMode: true +minRegisteredNodes: 0 # === END YAML diff --git a/basice2e/gateway-4.yaml b/basice2e/gateway-4.yaml index a72048f84fc711deb60d3c6da0c9531265820f91..be08d8634a13b7af250e58fe146e1ca38a2c0023 100644 --- a/basice2e/gateway-4.yaml +++ b/basice2e/gateway-4.yaml @@ -42,4 +42,5 @@ cmixCertPath: "../keys/cmix.rip.crt" devMode: true +minRegisteredNodes: 0 # === END YAML diff --git a/basice2e/gateway-5.yaml b/basice2e/gateway-5.yaml index 353dc07cac669bbfaf990546b5617a2fd0530b18..3b5a0c74bd8afd9c57b90f30c1642ea8a14791d2 100644 --- a/basice2e/gateway-5.yaml +++ b/basice2e/gateway-5.yaml @@ -42,4 +42,6 @@ cmixCertPath: "../keys/cmix.rip.crt" devMode: true +minRegisteredNodes: 0 + # === END YAML diff --git a/basice2e/run.sh b/basice2e/run.sh index df1de6c48aa02d7ee67fee0a67b66f9bca758d95..fdc7e30c1b362e342eb8579f15aaa63f1f5b3fef 100755 --- a/basice2e/run.sh +++ b/basice2e/run.sh @@ -34,6 +34,7 @@ UDBOUT=results/udb-console.txt CLIENTCLEAN=results/clients-cleaned CLIENTOPTS="--password hello --ndf results/ndf.json --verify-sends --sendDelay 100 --waitTimeout 360 -v $DEBUGLEVEL" +CLIENTEPHREGOPTS="--password hello --ndf results/ndf.json --verify-sends --sendDelay 100 --waitTimeout 360 -v $DEBUGLEVEL --disableNodeRegistration --enableEphemeralRegistration" CLIENTDMOPTS="--password hello --ndf results/ndf.json --waitTimeout 360 -v $DEBUGLEVEL" CLIENTUDOPTS="--password hello --ndf results/ndf.json -v $DEBUGLEVEL" CLIENTSINGLEOPTS="--password hello --waitTimeout 360 --ndf results/ndf.json -v $DEBUGLEVEL" @@ -1299,6 +1300,66 @@ wait $PIDVAL3 wait $PIDVAL2 wait $PIDVAL1 + +############################################################################### +# Test Ephemeral Registration (e2e test without registering with nodes) +############################################################################### + +echo "TESTING E2E WITH EPHEMERAL REGISTRATION" +CLIENTCMD="timeout 360s ../bin/client $CLIENTEPHREGOPTS -l $CLIENTOUT/client601.log -s blob601 --writeContact $CLIENTOUT/rick601-contact.bin --unsafe -m \"Hello from Rick601 to myself, without E2E Encryption\"" +eval $CLIENTCMD >> $CLIENTOUT/client601.txt & +PIDVAL=$! +echo "$CLIENTCMD -- $PIDVAL" +wait $PIDVAL +CLIENTCMD="timeout 360s ../bin/client $CLIENTEPHREGOPTS -l $CLIENTOUT/client602.log -s blob602 --writeContact $CLIENTOUT/ben602-contact.bin --destfile $CLIENTOUT/rick601-contact.bin --send-auth-request --unsafe-channel-creation --sendCount 0 --receiveCount 0" +eval $CLIENTCMD >> $CLIENTOUT/client602.txt & +PIDVAL2=$! +echo "$CLIENTCMD -- $PIDVAL" + +while [ ! -s $CLIENTOUT/ben602-contact.bin ]; do + sleep 1 + echo -n "." +done + + +TMPID=$(cat $CLIENTOUT/client601.log | grep -a "User\:" | awk -F' ' '{print $5}') +RICKID=${TMPID} +echo "RICK ID: $RICKID" +TMPID=$(cat $CLIENTOUT/client602.log | grep -a "User\:" | awk -F' ' '{print $5}') +BENID=${TMPID} +echo "BEN ID: $BENID" + +# Client 601 will now wait for client 602's E2E Auth channel request and confirm +CLIENTCMD="timeout 360s ../bin/client $CLIENTEPHREGOPTS -l $CLIENTOUT/client601.log -s blob601 --destfile $CLIENTOUT/ben602-contact.bin --sendCount 0 --receiveCount 0 --accept-channel --auth-timeout 360" +eval $CLIENTCMD >> $CLIENTOUT/client601.txt & +PIDVAL=$! +echo "$CLIENTCMD -- $PIDVAL" +wait $PIDVAL +wait $PIDVAL2 + +# Test destid syntax too, note wait for 11 messages to catch the message from above ^^^ +CLIENTCMD="timeout 360s ../bin/client $CLIENTEPHREGOPTS -l $CLIENTOUT/client601.log -s blob601 --destid b64:$BENID --sendCount 5 --receiveCount 5 -m \"Hello from Rick601, with E2E Encryption\"" +eval $CLIENTCMD >> $CLIENTOUT/client601.txt & +PIDVAL=$! +echo "$CLIENTCMD -- $PIDVAL" +CLIENTCMD="timeout 360s ../bin/client $CLIENTEPHREGOPTS -l $CLIENTOUT/client602.log -s blob602 --destid b64:$RICKID --sendCount 5 --receiveCount 5 -m \"Hello from Ben602, with E2E Encryption\"" +eval $CLIENTCMD >> $CLIENTOUT/client602.txt & +PIDVAL2=$! +echo "$CLIENTCMD -- $PIDVAL" +wait $PIDVAL +wait $PIDVAL2 +CLIENTCMD="timeout 360s ../bin/client $CLIENTEPHREGOPTS -l $CLIENTOUT/client601.log -s blob601 --destid b64:$BENID --sendCount 5 --receiveCount 5 -m \"Hello from Rick601, with E2E Encryption\"" +eval $CLIENTCMD >> $CLIENTOUT/client601.txt & +PIDVAL=$! +echo "$CLIENTCMD -- $PIDVAL" +CLIENTCMD="timeout 360s ../bin/client $CLIENTEPHREGOPTS -l $CLIENTOUT/client602.log -s blob602 --destid b64:$RICKID --sendCount 5 --receiveCount 5 -m \"Hello from Ben602, with E2E Encryption\"" +eval $CLIENTCMD >> $CLIENTOUT/client602.txt & +PIDVAL2=$! +echo "$CLIENTCMD -- $PIDVAL" +wait $PIDVAL +wait $PIDVAL2 + + echo "TESTS EXITED SUCCESSFULLY, CHECKING OUTPUT..."