Skip to content
Snippets Groups Projects
Commit 42b373fd authored by Richard T. Carback III's avatar Richard T. Carback III
Browse files

Merge branch 'feature/AceVentura/AccountBackup' into 'release'

Feature/ace ventura/account backup

See merge request !23
parents 1ffc8a88 0f52e296
No related branches found
No related tags found
3 merge requests!68Master merge,!23Feature/ace ventura/account backup,!11Release
Message received: Hello from Client120 to myself, without E2E Encryption
Message received: Hello from Client121, with E2E Encryption
Message received: Hello from Client121, with E2E Encryption
Message received: Hello from Client121, with E2E Encryption
Message received: Hello from Client121, with E2E Encryption
Message received: Hello from Client121, with E2E Encryption
Message received: Hello from Client121, with E2E Encryption after 121 restoring backup
Message received: Hello from Client121, with E2E Encryption after 121 restoring backup
Message received: Hello from Client121, with E2E Encryption after 121 restoring backup
Message received: Hello from Client121, with E2E Encryption after 121 restoring backup
Message received: Hello from Client121, with E2E Encryption after 121 restoring backup
Received 0
Received 0
Received 1
Received 5
Received 5
Sent: Hello from Client120 to myself, without E2E Encryption
Sent: Hello from Client120, with E2E Encryption
Sent: Hello from Client120, with E2E Encryption
Sent: Hello from Client120, with E2E Encryption
Sent: Hello from Client120, with E2E Encryption
Sent: Hello from Client120, with E2E Encryption
Sent: Hello from Client120, with E2E Encryption after 121 restoring backup
Sent: Hello from Client120, with E2E Encryption after 121 restoring backup
Sent: Hello from Client120, with E2E Encryption after 121 restoring backup
Sent: Hello from Client120, with E2E Encryption after 121 restoring backup
Sent: Hello from Client120, with E2E Encryption after 121 restoring backup
Adding
Adding
Backup update received.
Message received: Hello from Client120, with E2E Encryption
Message received: Hello from Client120, with E2E Encryption
Message received: Hello from Client120, with E2E Encryption
Message received: Hello from Client120, with E2E Encryption
Message received: Hello from Client120, with E2E Encryption
Message received: Hello from Client120, with E2E Encryption after 121 restoring backup
Message received: Hello from Client120, with E2E Encryption after 121 restoring backup
Message received: Hello from Client120, with E2E Encryption after 121 restoring backup
Message received: Hello from Client120, with E2E Encryption after 121 restoring backup
Message received: Hello from Client120, with E2E Encryption after 121 restoring backup
Received 0
Received 5
Received 5
Sent: Hello from Client121, with E2E Encryption
Sent: Hello from Client121, with E2E Encryption
Sent: Hello from Client121, with E2E Encryption
Sent: Hello from Client121, with E2E Encryption
Sent: Hello from Client121, with E2E Encryption
Sent: Hello from Client121, with E2E Encryption after 121 restoring backup
Sent: Hello from Client121, with E2E Encryption after 121 restoring backup
Sent: Hello from Client121, with E2E Encryption after 121 restoring backup
Sent: Hello from Client121, with E2E Encryption after 121 restoring backup
Sent: Hello from Client121, with E2E Encryption after 121 restoring backup
WARNING: unsafe channel creation enabled
WARNING: unsafe channel creation enabled
Message received: Hello from Ben43, with E2E Encryption
Message received: Hello from Ben43, with E2E Encryption
Message received: Hello from Ben43, with E2E Encryption
Message received: Hello from Ben43, with E2E Encryption
Message received: Hello from Ben43, with E2E Encryption
Message received: Hello from Ben43, with E2E Encryption
Message received: Hello from Ben43, with E2E Encryption
Message received: Hello from Ben43, with E2E Encryption
Message received: Hello from Ben43, with E2E Encryption
Message received: Hello from Ben43, with E2E Encryption
Message received: Hello from Ben43, with E2E Encryption Message received: Hello from Ben43, with E2E Encryption
Message received: Hello from Ben43, with E2E Encryption Message received: Hello from Ben43, with E2E Encryption
Message received: Hello from Ben43, with E2E Encryption Message received: Hello from Ben43, with E2E Encryption
...@@ -12,9 +22,14 @@ Message received: Hello from Ben43, with E2E Encryption ...@@ -12,9 +22,14 @@ Message received: Hello from Ben43, with E2E Encryption
Message received: Hello from Rick42 to myself, without E2E Encryption Message received: Hello from Rick42 to myself, without E2E Encryption
Received 0 Received 0
Received 0 Received 0
Received 0
Received 0
Received 1 Received 1
Received 5 Received 5
Received 5 Received 5
Received 5
Received 5
Resetting
Sent: Hello from Rick42 to myself, without E2E Encryption Sent: Hello from Rick42 to myself, without E2E Encryption
Sent: Hello from Rick42, with E2E Encryption Sent: Hello from Rick42, with E2E Encryption
Sent: Hello from Rick42, with E2E Encryption Sent: Hello from Rick42, with E2E Encryption
...@@ -26,3 +41,14 @@ Sent: Hello from Rick42, with E2E Encryption ...@@ -26,3 +41,14 @@ Sent: Hello from Rick42, with E2E Encryption
Sent: Hello from Rick42, with E2E Encryption Sent: Hello from Rick42, with E2E Encryption
Sent: Hello from Rick42, with E2E Encryption Sent: Hello from Rick42, with E2E Encryption
Sent: Hello from Rick42, with E2E Encryption Sent: Hello from Rick42, with E2E Encryption
Sent: Hello from Rick42, with E2E Encryption
Sent: Hello from Rick42, with E2E Encryption
Sent: Hello from Rick42, with E2E Encryption
Sent: Hello from Rick42, with E2E Encryption
Sent: Hello from Rick42, with E2E Encryption
Sent: Hello from Rick42, with E2E Encryption
Sent: Hello from Rick42, with E2E Encryption
Sent: Hello from Rick42, with E2E Encryption
Sent: Hello from Rick42, with E2E Encryption
Sent: Hello from Rick42, with E2E Encryption
WARNING: unsafe channel creation enabled
...@@ -9,9 +9,29 @@ Message received: Hello from Rick42, with E2E Encryption ...@@ -9,9 +9,29 @@ Message received: Hello from Rick42, with E2E Encryption
Message received: Hello from Rick42, with E2E Encryption Message received: Hello from Rick42, with E2E Encryption
Message received: Hello from Rick42, with E2E Encryption Message received: Hello from Rick42, with E2E Encryption
Message received: Hello from Rick42, with E2E Encryption Message received: Hello from Rick42, with E2E Encryption
Message received: Hello from Rick42, with E2E Encryption
Message received: Hello from Rick42, with E2E Encryption
Message received: Hello from Rick42, with E2E Encryption
Message received: Hello from Rick42, with E2E Encryption
Message received: Hello from Rick42, with E2E Encryption
Message received: Hello from Rick42, with E2E Encryption
Message received: Hello from Rick42, with E2E Encryption
Message received: Hello from Rick42, with E2E Encryption
Message received: Hello from Rick42, with E2E Encryption
Message received: Hello from Rick42, with E2E Encryption
Received 0 Received 0
Received 0
Received 0
Received 5
Received 5 Received 5
Received 5 Received 5
Received 5
Resetting
Sent: Hello from Ben43, with E2E Encryption
Sent: Hello from Ben43, with E2E Encryption
Sent: Hello from Ben43, with E2E Encryption
Sent: Hello from Ben43, with E2E Encryption
Sent: Hello from Ben43, with E2E Encryption
Sent: Hello from Ben43, with E2E Encryption Sent: Hello from Ben43, with E2E Encryption
Sent: Hello from Ben43, with E2E Encryption Sent: Hello from Ben43, with E2E Encryption
Sent: Hello from Ben43, with E2E Encryption Sent: Hello from Ben43, with E2E Encryption
...@@ -22,4 +42,10 @@ Sent: Hello from Ben43, with E2E Encryption ...@@ -22,4 +42,10 @@ Sent: Hello from Ben43, with E2E Encryption
Sent: Hello from Ben43, with E2E Encryption Sent: Hello from Ben43, with E2E Encryption
Sent: Hello from Ben43, with E2E Encryption Sent: Hello from Ben43, with E2E Encryption
Sent: Hello from Ben43, with E2E Encryption Sent: Hello from Ben43, with E2E Encryption
Sent: Hello from Ben43, with E2E Encryption
Sent: Hello from Ben43, with E2E Encryption
Sent: Hello from Ben43, with E2E Encryption
Sent: Hello from Ben43, with E2E Encryption
Sent: Hello from Ben43, with E2E Encryption
WARNING: unsafe channel creation enabled
WARNING: unsafe channel creation enabled WARNING: unsafe channel creation enabled
Adding
Message received: Hello, 4 Message received: Hello, 4
Message received: Hello, 4 Message received: Hello, 4
Message received: Hello, 4 Message received: Hello, 4
...@@ -38,6 +39,7 @@ Message received: Hello, 4 ...@@ -38,6 +39,7 @@ Message received: Hello, 4
Message received: Hello, 4 Message received: Hello, 4
Message received: Hello, 4 Message received: Hello, 4
Message received: Hello, 4 Message received: Hello, 4
Received 0
Received 20 Received 20
Received 20 Received 20
Sent: Hello, 5 Sent: Hello, 5
...@@ -80,3 +82,4 @@ Sent: Hello, 5 ...@@ -80,3 +82,4 @@ Sent: Hello, 5
Sent: Hello, 5 Sent: Hello, 5
Sent: Hello, 5 Sent: Hello, 5
Sent: Hello, 5 Sent: Hello, 5
WARNING: unsafe channel creation enabled
...@@ -36,6 +36,7 @@ CLIENTSINGLEOPTS="--password hello --waitTimeout 360 --ndf results/ndf.json -v $ ...@@ -36,6 +36,7 @@ CLIENTSINGLEOPTS="--password hello --waitTimeout 360 --ndf results/ndf.json -v $
CLIENTGROUPOPTS="--password hello --waitTimeout 360 --ndf results/ndf.json -v $DEBUGLEVEL" CLIENTGROUPOPTS="--password hello --waitTimeout 360 --ndf results/ndf.json -v $DEBUGLEVEL"
CLIENTFILETRANSFEROPTS="--password hello --waitTimeout 360 --ndf results/ndf.json -v $DEBUGLEVEL" CLIENTFILETRANSFEROPTS="--password hello --waitTimeout 360 --ndf results/ndf.json -v $DEBUGLEVEL"
CLIENTREKEYOPTS="--password hello --ndf results/ndf.json --verify-sends --waitTimeout 420 --unsafe-channel-creation -v $DEBUGLEVEL" CLIENTREKEYOPTS="--password hello --ndf results/ndf.json --verify-sends --waitTimeout 420 --unsafe-channel-creation -v $DEBUGLEVEL"
CLIENTBACKUPOPTS="--password hello --ndf results/ndf.json -v $DEBUGLEVEL"
mkdir -p $SERVERLOGS mkdir -p $SERVERLOGS
mkdir -p $GATEWAYLOGS mkdir -p $GATEWAYLOGS
...@@ -377,6 +378,56 @@ echo "$CLIENTCMD -- $PIDVAL" ...@@ -377,6 +378,56 @@ echo "$CLIENTCMD -- $PIDVAL"
wait $PIDVAL wait $PIDVAL
wait $PIDVAL2 wait $PIDVAL2
echo "TESTING RENEGOTIATION..."
CLIENTCMD="timeout 360s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client43.log -s blob43 --destfile $CLIENTOUT/rick42-contact.bin --send-auth-request --sendCount 0 --receiveCount 0"
eval $CLIENTCMD >> $CLIENTOUT/client43.txt || true &
PIDVAL1=$!
echo "$CLIENTCMD -- $PIDVAL1"
# Client 42 will now wait, again, for client 43's E2E Auth channel request and confirm
CLIENTCMD="timeout 360s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client42.log -s blob42 --destfile $CLIENTOUT/ben43-contact.bin --sendCount 0 --receiveCount 0"
eval $CLIENTCMD >> $CLIENTOUT/client42.txt || true &
PIDVAL2=$!
echo "$CLIENTCMD -- $PIDVAL2"
wait $PIDVAL1
wait $PIDVAL2
#Send a few messages
CLIENTCMD="timeout 360s ../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 &
PIDVAL=$!
echo "$CLIENTCMD -- $PIDVAL"
CLIENTCMD="timeout 360s ../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 &
PIDVAL2=$!
echo "$CLIENTCMD -- $PIDVAL2"
wait $PIDVAL
wait $PIDVAL2
echo "SWITCHING RENEGOTIATION TEST..."
# Switch places, 42 renegotiates with 43
CLIENTCMD="timeout 360s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client42.log -s blob42 --destfile $CLIENTOUT/ben43-contact.bin --send-auth-request --sendCount 0 --receiveCount 0"
eval $CLIENTCMD >> $CLIENTOUT/client42.txt || true &
PIDVAL1=$!
echo "$CLIENTCMD -- $PIDVAL1"
# Client 43 will now wait, for client 42's renegotiated E2E Auth channel request and confirm
CLIENTCMD="timeout 360s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client43.log -s blob43 --destfile $CLIENTOUT/rick42-contact.bin --sendCount 0 --receiveCount 0"
eval $CLIENTCMD >> $CLIENTOUT/client43.txt || true &
PIDVAL2=$!
echo "$CLIENTCMD -- $PIDVAL2"
wait $PIDVAL1
wait $PIDVAL2
#Send a few more messages
CLIENTCMD="timeout 360s ../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 &
PIDVAL=$!
echo "$CLIENTCMD -- $PIDVAL"
CLIENTCMD="timeout 360s ../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 &
PIDVAL2=$!
echo "$CLIENTCMD -- $PIDVAL2"
wait $PIDVAL
wait $PIDVAL2
echo "END RENEGOTIATION"
echo "DELETING CONTACT FROM CLIENT..." 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" 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 & eval $CLIENTCMD >> $CLIENTOUT/client42.txt || true &
...@@ -534,6 +585,94 @@ echo "$CLIENTCMD -- $PIDVAL" ...@@ -534,6 +585,94 @@ echo "$CLIENTCMD -- $PIDVAL"
wait $PIDVAL wait $PIDVAL
wait $PIDVAL2 wait $PIDVAL2
echo "START BACKUP AND RESTORE..."
CLIENTCMD="timeout 360s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client120.log -s blob120 --writeContact $CLIENTOUT/client120-contact.bin --unsafe -m \"Hello from Client120 to myself, without E2E Encryption\""
eval $CLIENTCMD >> $CLIENTOUT/client120.txt || true &
PIDVAL=$!
echo "$CLIENTCMD -- $PIDVAL"
wait $PIDVAL
CLIENTCMD="timeout 360s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client121.log -s blob121 --writeContact $CLIENTOUT/client121-contact.bin --destfile $CLIENTOUT/client120-contact.bin --send-auth-request --sendCount 0 --receiveCount 0"
eval $CLIENTCMD >> $CLIENTOUT/client121.txt || true &
PIDVAL2=$!
echo "$CLIENTCMD -- $PIDVAL"
while [ ! -s $CLIENTOUT/client121-contact.bin ]; do
sleep 1
echo -n "."
done
# Client 120 will now wait for client 121's E2E Auth channel request and confirm
CLIENTCMD="timeout 360s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client120.log -s blob120 --destfile $CLIENTOUT/client121-contact.bin --sendCount 0 --receiveCount 0"
eval $CLIENTCMD >> $CLIENTOUT/client120.txt || true &
PIDVAL=$!
echo "$CLIENTCMD -- $PIDVAL"
wait $PIDVAL
wait $PIDVAL2
# Send messages to each other
CLIENTCMD="timeout 360s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client120.log -s blob120 --destfile $CLIENTOUT/client121-contact.bin --sendCount 5 --receiveCount 5 -m \"Hello from Client120, with E2E Encryption\""
eval $CLIENTCMD >> $CLIENTOUT/client120.txt || true &
PIDVAL=$!
echo "$CLIENTCMD -- $PIDVAL"
CLIENTCMD="timeout 360s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client121.log -s blob121 --destfile $CLIENTOUT/client120-contact.bin --sendCount 5 --receiveCount 5 -m \"Hello from Client121, with E2E Encryption\""
eval $CLIENTCMD >> $CLIENTOUT/client121.txt || true &
PIDVAL2=$!
echo "$CLIENTCMD -- $PIDVAL"
wait $PIDVAL
wait $PIDVAL2
# Register 120 with UD
CLIENTCMD="timeout 240s ../bin/client ud $CLIENTUDOPTS -l $CLIENTOUT/client120.log -s blob120 --register client120"
eval $CLIENTCMD >> $CLIENTOUT/client120.txt || true &
PIDVAL=$!
echo "$CLIENTCMD -- $PIDVAL"
wait $PIDVAL
# Backup and restore 121
CLIENTCMD="timeout 60s ../bin/client $CLIENTBACKUPOPTS -l $CLIENTOUT/client121.log -s blob121 --backupOut $CLIENTOUT/client121A.backup --backupPass hello --backupJsonOut $CLIENTOUT/client121A.backup.json"
eval $CLIENTCMD >> $CLIENTOUT/client121.txt || true &
PIDVAL=$!
echo "$CLIENTCMD -- $PIDVAL"
wait $PIDVAL
rm -fr blob121
CLIENTCMD="timeout 60s ../bin/client $CLIENTBACKUPOPTS -l $CLIENTOUT/client121.log -s blob121 --backupIn $CLIENTOUT/client121A.backup --backupPass hello --backupJsonOut $CLIENTOUT/client121B.backup.json --backupIdList $CLIENTOUT/client121Partners.json"
eval $CLIENTCMD >> $CLIENTOUT/client121.txt || true &
PIDVAL=$!
echo "$CLIENTCMD -- $PIDVAL"
wait $PIDVAL
CLIENTCMD="timeout 240s ../bin/client ud $CLIENTUDOPTS -l $CLIENTOUT/client121.log -s blob121 --batchadd $CLIENTOUT/client121Partners.json --unsafe-channel-creation"
eval $CLIENTCMD >> $CLIENTOUT/client121.txt || true &
PIDVAL=$!
echo "$CLIENTCMD -- $PIDVAL"
CLIENTCMD="timeout 360s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client120.log -s blob120 --destfile $CLIENTOUT/client121-contact.bin --sendCount 0 --receiveCount 0 --unsafe-channel-creation"
eval $CLIENTCMD >> $CLIENTOUT/client120.txt || true &
PIDVAL2=$!
echo "$CLIENTCMD -- $PIDVAL2"
wait $PIDVAL
wait $PIDVAL2
# Send messages to each other
CLIENTCMD="timeout 360s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client120.log -s blob120 --destfile $CLIENTOUT/client121-contact.bin --sendCount 5 --receiveCount 5 -m \"Hello from Client120, with E2E Encryption after 121 restoring backup\" --unsafe-channel-creation"
eval $CLIENTCMD >> $CLIENTOUT/client120.txt || true &
PIDVAL=$!
echo "$CLIENTCMD -- $PIDVAL"
CLIENTCMD="timeout 360s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client121.log -s blob121 --destfile $CLIENTOUT/client120-contact.bin --sendCount 5 --receiveCount 5 -m \"Hello from Client121, with E2E Encryption after 121 restoring backup\" --unsafe-channel-creation"
eval $CLIENTCMD >> $CLIENTOUT/client121.txt || true &
PIDVAL2=$!
echo "$CLIENTCMD -- $PIDVAL"
wait $PIDVAL
wait $PIDVAL2
# TODO: Add test that backs up and restore client 120. To do this, you need to be able to delete old requests
echo "END BACKUP AND RESTORE..."
# Proto user test: client25 and client26 generate a proto user JSON file and close. # 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. # Both clients are restarted and load from their respective proto user files and attempt to send.
...@@ -1019,6 +1158,11 @@ then ...@@ -1019,6 +1158,11 @@ then
cat $GATEWAYLOGS/*.log | grep -a "ERROR" | grep -av "context" | grep -av "certificate" | grep -av "Failed to read key" | grep -av "$IGNOREMSG" > results/gateway-errors.txt || true cat $GATEWAYLOGS/*.log | grep -a "ERROR" | grep -av "context" | grep -av "certificate" | grep -av "Failed to read key" | grep -av "$IGNOREMSG" > results/gateway-errors.txt || true
cat $GATEWAYLOGS/*.log | grep -a "FATAL" | grep -av "context" | grep -av "transport is closing" >> results/gateway-errors.txt || true cat $GATEWAYLOGS/*.log | grep -a "FATAL" | grep -av "context" | grep -av "transport is closing" >> results/gateway-errors.txt || true
diff -aruN results/gateway-errors.txt noerrors.txt diff -aruN results/gateway-errors.txt noerrors.txt
echo "Checking backup files for equality..."
# diff -aruN $CLIENTOUT/client120A.backup.json $CLIENTOUT/client120B.backup.json > client120BackupDiff.txt
diff -aruN $CLIENTOUT/client121A.backup.json $CLIENTOUT/client121B.backup.json > client121BackupDiff.txt
# diff -aruN client120BackupDiff.txt noerrors.txt
diff -aruN client121BackupDiff.txt noerrors.txt
fi fi
echo "NO OUTPUT ERRORS, SUCCESS!" echo "NO OUTPUT ERRORS, SUCCESS!"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment