Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
integration
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
integration
Commits
27935713
Commit
27935713
authored
3 years ago
by
Josh Brooks
Browse files
Options
Downloads
Patches
Plain Diff
Add code for proto USer
parent
4bfaa56b
Branches
Branches containing commit
No related tags found
3 merge requests
!68
Master merge
,
!11
Release
,
!9
Add code for proto USer
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
basice2e/permissioning.yaml
+4
-0
4 additions, 0 deletions
basice2e/permissioning.yaml
basice2e/run.sh
+219
-153
219 additions, 153 deletions
basice2e/run.sh
with
223 additions
and
153 deletions
basice2e/permissioning.yaml
+
4
−
0
View file @
27935713
...
@@ -34,6 +34,10 @@ allowLocalIPs: true
...
@@ -34,6 +34,10 @@ allowLocalIPs: true
disableNDFPruning
:
true
disableNDFPruning
:
true
permissiveIPChecking
:
true
permissiveIPChecking
:
true
# How long rounds will be tracked by gateways. Rounds (and messages as an extension)
# prior to this period are not guaranteed to be delivered to clients.
# Expects duration in"h". (Defaults to 1 weeks (168 hours)
messageRetentionLimit
:
"
168h"
# "Location of the user discovery contact file.
# "Location of the user discovery contact file.
udContactPath
:
"
results/udContact.bin"
udContactPath
:
"
results/udContact.bin"
...
...
This diff is collapsed.
Click to expand it.
basice2e/run.sh
+
219
−
153
View file @
27935713
...
@@ -239,159 +239,161 @@ runclients() {
...
@@ -239,159 +239,161 @@ runclients() {
}
}
if
[
"
$NETWORKENTRYPOINT
"
==
"localhost:8440"
]
#if [ "$NETWORKENTRYPOINT" == "localhost:8440" ]
then
#then
#
echo
"RUNNING BASIC CLIENTS..."
# echo "RUNNING BASIC CLIENTS..."
runclients
# runclients
echo
"RUNNING BASIC CLIENTS (2nd time)..."
# echo "RUNNING BASIC CLIENTS (2nd time)..."
runclients
# runclients
#
# Send E2E messages between a single user
# # Send E2E messages between a single user
mkdir
-p
blob9
# mkdir -p blob9
mkdir
-p
blob18
# mkdir -p blob18
mkdir
-p
blob91
# mkdir -p blob91
echo
"TEST E2E WITH PRECANNED USERS..."
# echo "TEST E2E WITH PRECANNED USERS..."
CLIENTCMD
=
"timeout 240s ../bin/client
$CLIENTOPTS
-l
$CLIENTOUT
/client9.log --sendDelay 1000 --sendCount 2 --receiveCount 2 -s blob9/blob9 --sendid 9 --destid 9 -m
\"
Hi 9->9, with E2E Encryption
\"
"
# CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client9.log --sendDelay 1000 --sendCount 2 --receiveCount 2 -s blob9/blob9 --sendid 9 --destid 9 -m \"Hi 9->9, with E2E Encryption\""
eval
$CLIENTCMD
>>
$CLIENTOUT
/client9.txt 2>&1 &
# eval $CLIENTCMD >> $CLIENTOUT/client9.txt 2>&1 &
PIDVAL
=
$!
# PIDVAL=$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
# echo "$CLIENTCMD -- $PIDVAL"
wait
$PIDVAL
# wait $PIDVAL
CLIENTCMD
=
"timeout 240s ../bin/client
$CLIENTOPTS
-l
$CLIENTOUT
/client9.log --sendDelay 1000 --sendCount 2 --receiveCount 2 -s blob9/blob9 --sendid 9 --destid 9 -m
\"
Hi 9->9, with E2E Encryption
\"
"
# CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client9.log --sendDelay 1000 --sendCount 2 --receiveCount 2 -s blob9/blob9 --sendid 9 --destid 9 -m \"Hi 9->9, with E2E Encryption\""
eval
$CLIENTCMD
>>
$CLIENTOUT
/client9.txt 2>&1 &
# eval $CLIENTCMD >> $CLIENTOUT/client9.txt 2>&1 &
PIDVAL
=
$!
# PIDVAL=$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
# echo "$CLIENTCMD -- $PIDVAL"
wait
$PIDVAL
# wait $PIDVAL
CLIENTCMD
=
"timeout 240s ../bin/client
$CLIENTOPTS
-l
$CLIENTOUT
/client19.log --sendDelay 1000 --sendCount 2 --receiveCount 2 -s blob19/blob19 --slowPolling --sendid 19 --destid 19 -m
\"
Hi 19->19, with E2E Encryption
\"
"
# CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client19.log --sendDelay 1000 --sendCount 2 --receiveCount 2 -s blob19/blob19 --slowPolling --sendid 19 --destid 19 -m \"Hi 19->19, with E2E Encryption\""
eval
$CLIENTCMD
>>
$CLIENTOUT
/client19.txt 2>&1 &
# eval $CLIENTCMD >> $CLIENTOUT/client19.txt 2>&1 &
PIDVAL
=
$!
# PIDVAL=$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
# echo "$CLIENTCMD -- $PIDVAL"
wait
$PIDVAL
# wait $PIDVAL
#
#
# Send E2E messages between two users
# # Send E2E messages between two users
CLIENTCMD
=
"timeout 240s ../bin/client
$CLIENTOPTS
-l
$CLIENTOUT
/client9.log --sendDelay 1000 --sendCount 3 --receiveCount 3 -s blob9/blob9 --sendid 9 --destid 18 -m
\"
Hi 9->18, with E2E Encryption
\"
"
# CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client9.log --sendDelay 1000 --sendCount 3 --receiveCount 3 -s blob9/blob9 --sendid 9 --destid 18 -m \"Hi 9->18, with E2E Encryption\""
eval
$CLIENTCMD
>>
$CLIENTOUT
/client9.txt 2>&1 &
# eval $CLIENTCMD >> $CLIENTOUT/client9.txt 2>&1 &
PIDVAL1
=
$!
# PIDVAL1=$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
# echo "$CLIENTCMD -- $PIDVAL"
CLIENTCMD
=
"timeout 240s ../bin/client
$CLIENTOPTS
-l
$CLIENTOUT
/client18.log --sendDelay 1000 --sendCount 3 --receiveCount 3 -s blob18/blob18 --sendid 18 --destid 9 -m
\"
Hi 18->9, with E2E Encryption
\"
"
# CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client18.log --sendDelay 1000 --sendCount 3 --receiveCount 3 -s blob18/blob18 --sendid 18 --destid 9 -m \"Hi 18->9, with E2E Encryption\""
eval
$CLIENTCMD
>>
$CLIENTOUT
/client18.txt 2>&1 &
# eval $CLIENTCMD >> $CLIENTOUT/client18.txt 2>&1 &
PIDVAL2
=
$!
# PIDVAL2=$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
# echo "$CLIENTCMD -- $PIDVAL"
wait
$PIDVAL1
# wait $PIDVAL1
wait
$PIDVAL2
# wait $PIDVAL2
#
#
# Send multiple E2E encrypted messages between users that discovered each other
# # Send multiple E2E encrypted messages between users that discovered each other
echo
"SENDING MESSAGES TO PRECANNED USERS AND FORCING A REKEY..."
# echo "SENDING MESSAGES TO PRECANNED USERS AND FORCING A REKEY..."
CLIENTCMD
=
"timeout 240s ../bin/client
$CLIENTOPTS
-l
$CLIENTOUT
/client18_rekey.log --sendCount 20 --receiveCount 20 --destid 9 -s blob18/blob18 -m
\"
Hello, 9, with E2E Encryption
\"
"
# CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client18_rekey.log --sendCount 20 --receiveCount 20 --destid 9 -s blob18/blob18 -m \"Hello, 9, with E2E Encryption\""
eval
$CLIENTCMD
>>
$CLIENTOUT
/client18_rekey.txt 2>&1
||
true
&
# eval $CLIENTCMD >> $CLIENTOUT/client18_rekey.txt 2>&1 || true &
PIDVAL
=
$!
# PIDVAL=$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
# echo "$CLIENTCMD -- $PIDVAL"
CLIENTCMD
=
"timeout 240s ../bin/client
$CLIENTOPTS
-l
$CLIENTOUT
/client9_rekey.log --sendCount 20 --receiveCount 20 --destid 18 -s blob9/blob9 -m
\"
Hello, 18, with E2E Encryption
\"
"
# CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client9_rekey.log --sendCount 20 --receiveCount 20 --destid 18 -s blob9/blob9 -m \"Hello, 18, with E2E Encryption\""
eval
$CLIENTCMD
>>
$CLIENTOUT
/client9_rekey.txt 2>&1
||
true
&
# eval $CLIENTCMD >> $CLIENTOUT/client9_rekey.txt 2>&1 || true &
PIDVAL
=
$!
# PIDVAL=$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
# echo "$CLIENTCMD -- $PIDVAL"
wait
$PIDVAL
||
true
# wait $PIDVAL || true
#
echo
"FORCING HISTORICAL ROUNDS... (NON-E2E, PRECAN)"
# echo "FORCING HISTORICAL ROUNDS... (NON-E2E, PRECAN)"
CLIENTCMD
=
"timeout 240s ../bin/client
$CLIENTOPTS
--forceHistoricalRounds --unsafe -l
$CLIENTOUT
/client35.log -s blob35 --sendid 1 --destid 2 --sendCount 5 --receiveCount 5 -m
\"
Hello from 1, without E2E Encryption
\"
"
# CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS --forceHistoricalRounds --unsafe -l $CLIENTOUT/client35.log -s blob35 --sendid 1 --destid 2 --sendCount 5 --receiveCount 5 -m \"Hello from 1, without E2E Encryption\""
eval
$CLIENTCMD
>>
$CLIENTOUT
/client35.txt
||
true
&
# eval $CLIENTCMD >> $CLIENTOUT/client35.txt || true &
PIDVAL
=
$!
# PIDVAL=$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
# echo "$CLIENTCMD -- $PIDVAL"
CLIENTCMD
=
"timeout 240s ../bin/client
$CLIENTOPTS
--forceHistoricalRounds --unsafe -l
$CLIENTOUT
/client36.log -s blob36 --sendid 2 --destid 1 --sendCount 5 --receiveCount 5 -m
\"
Hello from 2, without E2E Encryption
\"
"
# CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS --forceHistoricalRounds --unsafe -l $CLIENTOUT/client36.log -s blob36 --sendid 2 --destid 1 --sendCount 5 --receiveCount 5 -m \"Hello from 2, without E2E Encryption\""
eval
$CLIENTCMD
>>
$CLIENTOUT
/client36.txt
||
true
&
# eval $CLIENTCMD >> $CLIENTOUT/client36.txt || true &
PIDVAL2
=
$!
# PIDVAL2=$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
# echo "$CLIENTCMD -- $PIDVAL"
wait
$PIDVAL
# wait $PIDVAL
wait
$PIDVAL2
# wait $PIDVAL2
#
echo
"FORCING MESSAGE PICKUP RETRY... (NON-E2E, PRECAN)"
# echo "FORCING MESSAGE PICKUP RETRY... (NON-E2E, PRECAN)"
# Higher timeouts for this test to allow message pickup retry to function
# # Higher timeouts for this test to allow message pickup retry to function
CLIENTCMD
=
"timeout 360s ../bin/client
$CLIENTOPTS
--forceMessagePickupRetry --unsafe -l
$CLIENTOUT
/client20.log -s blob20 --sendid 20 --destid 21 --sendCount 5 --receiveCount 5 -m
\"
Hello from 20, without E2E Encryption
\"
"
# CLIENTCMD="timeout 360s ../bin/client $CLIENTOPTS --forceMessagePickupRetry --unsafe -l $CLIENTOUT/client20.log -s blob20 --sendid 20 --destid 21 --sendCount 5 --receiveCount 5 -m \"Hello from 20, without E2E Encryption\""
eval
$CLIENTCMD
>>
$CLIENTOUT
/client20.txt
||
true
&
# eval $CLIENTCMD >> $CLIENTOUT/client20.txt || true &
PIDVAL
=
$!
# PIDVAL=$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
# echo "$CLIENTCMD -- $PIDVAL"
CLIENTCMD
=
"timeout 360s ../bin/client
$CLIENTOPTS
--forceMessagePickupRetry --unsafe -l
$CLIENTOUT
/client21.log -s blob21 --sendid 21 --destid 20 --sendCount 5 --receiveCount 5 -m
\"
Hello from 21, without E2E Encryption
\"
"
# CLIENTCMD="timeout 360s ../bin/client $CLIENTOPTS --forceMessagePickupRetry --unsafe -l $CLIENTOUT/client21.log -s blob21 --sendid 21 --destid 20 --sendCount 5 --receiveCount 5 -m \"Hello from 21, without E2E Encryption\""
eval
$CLIENTCMD
>>
$CLIENTOUT
/client21.txt
||
true
&
# eval $CLIENTCMD >> $CLIENTOUT/client21.txt || true &
PIDVAL2
=
$!
# PIDVAL2=$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
# echo "$CLIENTCMD -- $PIDVAL"
wait
$PIDVAL
# wait $PIDVAL
wait
$PIDVAL2
# wait $PIDVAL2
#
#
fi
#fi
# Non-precanned E2E user messaging
## Non-precanned E2E user messaging
echo
"SENDING E2E MESSAGES TO NEW USERS..."
#echo "SENDING E2E MESSAGES TO NEW USERS..."
CLIENTCMD
=
"timeout 240s ../bin/client
$CLIENTOPTS
-l
$CLIENTOUT
/client42.log -s blob42 --writeContact
$CLIENTOUT
/rick42-contact.bin --unsafe -m
\"
Hello from Rick42 to myself, without E2E Encryption
\"
"
#CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client42.log -s blob42 --writeContact $CLIENTOUT/rick42-contact.bin --unsafe -m \"Hello from Rick42 to myself, without E2E Encryption\""
eval
$CLIENTCMD
>>
$CLIENTOUT
/client42.txt
||
true
&
#eval $CLIENTCMD >> $CLIENTOUT/client42.txt || true &
PIDVAL
=
$!
#PIDVAL=$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
#echo "$CLIENTCMD -- $PIDVAL"
wait
$PIDVAL
#wait $PIDVAL
CLIENTCMD
=
"timeout 240s ../bin/client
$CLIENTOPTS
-l
$CLIENTOUT
/client43.log -s blob43 --writeContact
$CLIENTOUT
/ben43-contact.bin --destfile
$CLIENTOUT
/rick42-contact.bin --send-auth-request --sendCount 0 --receiveCount 0"
#CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client43.log -s blob43 --writeContact $CLIENTOUT/ben43-contact.bin --destfile $CLIENTOUT/rick42-contact.bin --send-auth-request --sendCount 0 --receiveCount 0"
eval
$CLIENTCMD
>>
$CLIENTOUT
/client43.txt
||
true
&
#eval $CLIENTCMD >> $CLIENTOUT/client43.txt || true &
PIDVAL2
=
$!
#PIDVAL2=$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
#echo "$CLIENTCMD -- $PIDVAL"
#
while
[
!
-s
$CLIENTOUT
/ben43-contact.bin
]
;
do
#while [ ! -s $CLIENTOUT/ben43-contact.bin ]; do
sleep
1
# sleep 1
echo
-n
"."
# echo -n "."
done
#done
#
#
TMPID
=
$(
cat
$CLIENTOUT
/client42.log |
grep
-a
"User
\:
"
|
awk
-F
' '
'{print $5}'
)
#TMPID=$(cat $CLIENTOUT/client42.log | grep -a "User\:" | awk -F' ' '{print $5}')
RICKID
=
${
TMPID
}
#RICKID=${TMPID}
echo
"RICK ID:
$RICKID
"
#echo "RICK ID: $RICKID"
TMPID
=
$(
cat
$CLIENTOUT
/client43.log |
grep
-a
"User
\:
"
|
awk
-F
' '
'{print $5}'
)
#TMPID=$(cat $CLIENTOUT/client43.log | grep -a "User\:" | awk -F' ' '{print $5}')
BENID
=
${
TMPID
}
#BENID=${TMPID}
echo
"BEN ID:
$BENID
"
#echo "BEN ID: $BENID"
#
# Client 42 will now wait for client 43's E2E Auth channel request and confirm
## Client 42 will now wait for client 43's E2E Auth channel request and confirm
CLIENTCMD
=
"timeout 240s ../bin/client
$CLIENTOPTS
-l
$CLIENTOUT
/client42.log -s blob42 --destfile
$CLIENTOUT
/ben43-contact.bin --sendCount 0 --receiveCount 0"
#CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client42.log -s blob42 --destfile $CLIENTOUT/ben43-contact.bin --sendCount 0 --receiveCount 0"
eval
$CLIENTCMD
>>
$CLIENTOUT
/client42.txt
||
true
&
#eval $CLIENTCMD >> $CLIENTOUT/client42.txt || true &
PIDVAL
=
$!
#PIDVAL=$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
#echo "$CLIENTCMD -- $PIDVAL"
wait
$PIDVAL
#wait $PIDVAL
wait
$PIDVAL2
#wait $PIDVAL2
#
# Test destid syntax too, note wait for 11 messages to catch the message from above ^^^
## Test destid syntax too, note wait for 11 messages to catch the message from above ^^^
CLIENTCMD
=
"timeout 240s ../bin/client
$CLIENTOPTS
-l
$CLIENTOUT
/client42.log -s blob42 --destid b64:
$BENID
--sendCount 5 --receiveCount 5 -m
\"
Hello from Rick42, with E2E Encryption
\"
"
#CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client42.log -s blob42 --destid b64:$BENID --sendCount 5 --receiveCount 5 -m \"Hello from Rick42, with E2E Encryption\""
eval
$CLIENTCMD
>>
$CLIENTOUT
/client42.txt
||
true
&
#eval $CLIENTCMD >> $CLIENTOUT/client42.txt || true &
PIDVAL
=
$!
#PIDVAL=$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
#echo "$CLIENTCMD -- $PIDVAL"
CLIENTCMD
=
"timeout 240s ../bin/client
$CLIENTOPTS
-l
$CLIENTOUT
/client43.log -s blob43 --destid b64:
$RICKID
--sendCount 5 --receiveCount 5 -m
\"
Hello from Ben43, with E2E Encryption
\"
"
#CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client43.log -s blob43 --destid b64:$RICKID --sendCount 5 --receiveCount 5 -m \"Hello from Ben43, with E2E Encryption\""
eval
$CLIENTCMD
>>
$CLIENTOUT
/client43.txt
||
true
&
#eval $CLIENTCMD >> $CLIENTOUT/client43.txt || true &
PIDVAL2
=
$!
#PIDVAL2=$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
#echo "$CLIENTCMD -- $PIDVAL"
wait
$PIDVAL
#wait $PIDVAL
wait
$PIDVAL2
#wait $PIDVAL2
CLIENTCMD
=
"timeout 240s ../bin/client
$CLIENTOPTS
-l
$CLIENTOUT
/client42.log -s blob42 --destid b64:
$BENID
--sendCount 5 --receiveCount 5 -m
\"
Hello from Rick42, with E2E Encryption
\"
"
#CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client42.log -s blob42 --destid b64:$BENID --sendCount 5 --receiveCount 5 -m \"Hello from Rick42, with E2E Encryption\""
eval
$CLIENTCMD
>>
$CLIENTOUT
/client42.txt
||
true
&
#eval $CLIENTCMD >> $CLIENTOUT/client42.txt || true &
PIDVAL
=
$!
#PIDVAL=$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
#echo "$CLIENTCMD -- $PIDVAL"
CLIENTCMD
=
"timeout 240s ../bin/client
$CLIENTOPTS
-l
$CLIENTOUT
/client43.log -s blob43 --destid b64:
$RICKID
--sendCount 5 --receiveCount 5 -m
\"
Hello from Ben43, with E2E Encryption
\"
"
#CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client43.log -s blob43 --destid b64:$RICKID --sendCount 5 --receiveCount 5 -m \"Hello from Ben43, with E2E Encryption\""
eval
$CLIENTCMD
>>
$CLIENTOUT
/client43.txt
||
true
&
#eval $CLIENTCMD >> $CLIENTOUT/client43.txt || true &
PIDVAL2
=
$!
#PIDVAL2=$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
#echo "$CLIENTCMD -- $PIDVAL"
wait
$PIDVAL
#wait $PIDVAL
wait
$PIDVAL2
#wait $PIDVAL2
#
#echo "DELETING CONTACT FROM CLIENT..."
#CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client42.log -s blob42 --delete-channel --destfile $CLIENTOUT/ben43-contact.bin --sendCount 0 --receiveCount 0"
#eval $CLIENTCMD >> $CLIENTOUT/client42.txt || true &
#echo "$CLIENTCMD -- $PIDVAL"
#PIDVAL1=$!
#wait $PIDVAL1
## NOTE the command below causes the following EXPECTED error:
## panic: Could not confirm authentication channel for HTAmEeBhbLi6aFqcWsi3OZNDE/642GAchpATjhYFTHwD, waited 120 seconds.
## Note that the above is example, client IDs will vary
#CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client42.log -s blob42 --destid b64:$BENID --sendCount 5 --receiveCount 5 -m \"Hello from Rick42, with E2E Encryption\""
#eval $CLIENTCMD >> $CLIENTOUT/client42.txt || true &
#PIDVAL2=$!
#echo "$CLIENTCMD -- $PIDVAL"
#wait $PIDVAL2
echo
"DELETING CONTACT FROM CLIENT..."
CLIENTCMD
=
"timeout 240s ../bin/client
$CLIENTOPTS
-l
$CLIENTOUT
/client42.log -s blob42 --delete-channel --destfile
$CLIENTOUT
/ben43-contact.bin --sendCount 0 --receiveCount 0"
eval
$CLIENTCMD
>>
$CLIENTOUT
/client42.txt
||
true
&
echo
"
$CLIENTCMD
--
$PIDVAL
"
PIDVAL1
=
$!
wait
$PIDVAL1
# NOTE the command below causes the following EXPECTED error:
# panic: Could not confirm authentication channel for HTAmEeBhbLi6aFqcWsi3OZNDE/642GAchpATjhYFTHwD, waited 120 seconds.
# Note that the above is example, client IDs will vary
CLIENTCMD
=
"timeout 240s ../bin/client
$CLIENTOPTS
-l
$CLIENTOUT
/client42.log -s blob42 --destid b64:
$BENID
--sendCount 5 --receiveCount 5 -m
\"
Hello from Rick42, with E2E Encryption
\"
"
eval
$CLIENTCMD
>>
$CLIENTOUT
/client42.txt
||
true
&
PIDVAL2
=
$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
wait
$PIDVAL2
########### KEEP COMMENTED OUT, DO NOT UNCOMMENT WHEN UNCOMMENTING OUT ABOVE ################################
# echo "CREATING USERS for REKEY TEST..."
# echo "CREATING USERS for REKEY TEST..."
# JAKEID=$(../bin/client init -s blob100 -l $CLIENTOUT/client100.log --password hello --ndf results/ndf.json --writeContact $CLIENTOUT/Jake100-contact.bin -v $DEBUGLEVEL)
# JAKEID=$(../bin/client init -s blob100 -l $CLIENTOUT/client100.log --password hello --ndf results/ndf.json --writeContact $CLIENTOUT/Jake100-contact.bin -v $DEBUGLEVEL)
# NIAMHID=$(../bin/client init -s blob101 -l $CLIENTOUT/client101.log --password hello --ndf results/ndf.json --writeContact $CLIENTOUT/Niamh101-contact.bin -v $DEBUGLEVEL)
# NIAMHID=$(../bin/client init -s blob101 -l $CLIENTOUT/client101.log --password hello --ndf results/ndf.json --writeContact $CLIENTOUT/Niamh101-contact.bin -v $DEBUGLEVEL)
...
@@ -466,6 +468,70 @@ wait $PIDVAL2
...
@@ -466,6 +468,70 @@ wait $PIDVAL2
# wait $PIDVAL
# wait $PIDVAL
# wait $PIDVAL2
# wait $PIDVAL2
################### Do not uncomment above, it was meant to be commented out
# Proto user test: client25 and client26 generate a proto user JSON file and close.
# Both clients are restarted and load from their respective proto user files and attempt to send.
# Generate contact and proto user file for client25
echo
"TESTING PROTO USER FILE..."
CLIENTCMD
=
"../bin/client proto -l
$CLIENTOUT
/client25.log -s junk25 --password hello --ndf results/ndf.json --writeContact
$CLIENTOUT
/josh25-contact.bin --protoUserOut
$CLIENTOUT
/client25Proto.json --unsafe -m
\"
Hello from Rick42 to myself, without E2E Encryption
\"
"
eval
$CLIENTCMD
>>
$CLIENTOUT
/client25.txt
||
true
&
PIDVAL
=
$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
wait
$PIDVAL
# Generate contact and proto user file for client 26
CLIENTCMD
=
"../bin/client proto -l
$CLIENTOUT
/client26.log -s junk26 --password hello --ndf results/ndf.json --writeContact
$CLIENTOUT
/jonah26-contact.bin --protoUserOut
$CLIENTOUT
/client26Proto.json --send-auth-request --sendCount 0 --receiveCount 0"
eval
$CLIENTCMD
>>
$CLIENTOUT
/client25.txt
||
true
&
PIDVAL
=
$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
wait
$PIDVAL
while
[
!
-s
$CLIENTOUT
/jonah26-contact.bin
]
;
do
sleep
1
echo
-n
"."
done
# Print IDs to console
TMPID
=
$(
cat
$CLIENTOUT
/client25.log |
grep
-a
"User
\:
"
|
awk
-F
' '
'{print $5}'
)
JOSHID
=
${
TMPID
}
echo
"JOSH ID:
$JOSHID
"
TMPID
=
$(
cat
$CLIENTOUT
/client26.log |
grep
-a
"User
\:
"
|
awk
-F
' '
'{print $5}'
)
JONAHID
=
${
TMPID
}
echo
"JONAH ID:
$JONAHID
"
# Client 25 will now wait for client 26's E2E Auth channel request and confirm
CLIENTCMD
=
"timeout 240s ../bin/client proto
$CLIENTOPTS
-l
$CLIENTOUT
/client25.log -s blob25 --protoUserPath
$CLIENTOUT
/client25Proto.json --destfile
$CLIENTOUT
/jonah26-contact.bin --sendCount 0 --receiveCount 0"
eval
$CLIENTCMD
>>
$CLIENTOUT
/client25.txt
||
true
&
PIDVAL
=
$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
wait
$PIDVAL
wait
$PIDVAL2
# Send E2E messages
CLIENTCMD
=
"timeout 240s ../bin/client proto
$CLIENTOPTS
-l
$CLIENTOUT
/client25.log -s blob25 --protoUserPath
$CLIENTOUT
/client25Proto.json --destid b64:
$JONAHID
--sendCount 5 --receiveCount 5 -m
\"
Hello from Josh25, with E2E Encryption
\"
"
eval
$CLIENTCMD
>>
$CLIENTOUT
/client25.txt
||
true
&
PIDVAL
=
$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
CLIENTCMD
=
"timeout 240s ../bin/client proto
$CLIENTOPTS
-l
$CLIENTOUT
/client26.log -s blob26 --protoUserPath
$CLIENTOUT
/client26Proto.json --destid b64:
$JOSHID
--sendCount 5 --receiveCount 5 -m
\"
Hello from Jonah26, with E2E Encryption
\"
"
eval
$CLIENTCMD
>>
$CLIENTOUT
/client26.txt
||
true
&
PIDVAL2
=
$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
wait
$PIDVAL
wait
$PIDVAL2
CLIENTCMD
=
"timeout 240s ../bin/client proto
$CLIENTOPTS
-l
$CLIENTOUT
/client25.log -s blob25 --protoUserPath
$CLIENTOUT
/client25Proto.json --destid b64:
$JONAHID
--sendCount 5 --receiveCount 5 -m
\"
Hello from Josh25, with E2E Encryption
\"
"
eval
$CLIENTCMD
>>
$CLIENTOUT
/client25.txt
||
true
&
PIDVAL
=
$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
CLIENTCMD
=
"timeout 240s ../bin/client proto
$CLIENTOPTS
-l
$CLIENTOUT
/client26.log -s blob26 --protoUserPath
$CLIENTOUT
/client26Proto.json --destid b64:
$JOSHID
--sendCount 5 --receiveCount 5 -m
\"
Hello from Jonah26, with E2E Encryption
\"
"
eval
$CLIENTCMD
>>
$CLIENTOUT
/client26.txt
||
true
&
PIDVAL2
=
$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
wait
$PIDVAL
wait
$PIDVAL2
# Single-use test: client53 sends message to client52; client52 responds with
# Single-use test: client53 sends message to client52; client52 responds with
# the same message in the set number of message parts
# the same message in the set number of message parts
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment