diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2023-10-18 15:15:05 +0200 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2023-10-18 15:15:05 +0200 |
commit | 65dbd214b80664872f6514fdd663a30e405a6ad6 (patch) | |
tree | 532c259a19cad3fe3bf7d83f0dc1ec5bd48fb170 /src/identity/test_identity_messages.sh | |
parent | 76299f0b66a3f8ce86df90171b450da6b9cd9b7c (diff) | |
download | gnunet-65dbd214b80664872f6514fdd663a30e405a6ad6.tar.gz gnunet-65dbd214b80664872f6514fdd663a30e405a6ad6.zip |
BUILD: Move identity/rest components to service/rest-plugin
Diffstat (limited to 'src/identity/test_identity_messages.sh')
-rwxr-xr-x | src/identity/test_identity_messages.sh | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/src/identity/test_identity_messages.sh b/src/identity/test_identity_messages.sh deleted file mode 100755 index edb4d5805..000000000 --- a/src/identity/test_identity_messages.sh +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | #!/bin/bash | ||
2 | trap "gnunet-arm -e -c test_identity.conf" SIGINT | ||
3 | |||
4 | LOCATION=$(which gnunet-config) | ||
5 | if [ -z $LOCATION ] | ||
6 | then | ||
7 | LOCATION="gnunet-config" | ||
8 | fi | ||
9 | $LOCATION --version 1> /dev/null | ||
10 | if test $? != 0 | ||
11 | then | ||
12 | echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX" | ||
13 | exit 77 | ||
14 | fi | ||
15 | |||
16 | rm -rf `gnunet-config -c test_identity.conf -s PATHS -o GNUNET_HOME -f` | ||
17 | |||
18 | which timeout >/dev/null 2>&1 && DO_TIMEOUT="timeout 30" | ||
19 | |||
20 | TEST_MSG="This is a test message. 123" | ||
21 | gnunet-arm -s -c test_identity.conf | ||
22 | gnunet-identity -C recipientego -c test_identity.conf | ||
23 | gnunet-identity -C recipientegoed -X -c test_identity.conf | ||
24 | RECIPIENT_KEY=`gnunet-identity -d -e recipientego -q -c test_identity.conf` | ||
25 | MSG_ENC=`gnunet-identity -W "$TEST_MSG" -k $RECIPIENT_KEY -c test_identity.conf` | ||
26 | if [ $? == 0 ] | ||
27 | then | ||
28 | MSG_DEC=`gnunet-identity -R "$MSG_ENC" -e recipientego -c test_identity.conf` | ||
29 | fi | ||
30 | RECIPIENT_KEY_ED=`gnunet-identity -d -e recipientegoed -q -c test_identity.conf` | ||
31 | MSG_ENC_ED=`gnunet-identity -W "$TEST_MSG" -k $RECIPIENT_KEY_ED -c test_identity.conf` | ||
32 | if [ $? == 0 ] | ||
33 | then | ||
34 | MSG_DEC_ED=`gnunet-identity -R "$MSG_ENC_ED" -e recipientegoed -c test_identity.conf` | ||
35 | fi | ||
36 | gnunet-identity -D recipientego -c test_identity.conf | ||
37 | gnunet-identity -D recipientegoed -c test_identity.conf | ||
38 | gnunet-arm -e -c test_identity.conf | ||
39 | if [ "$TEST_MSG" != "$MSG_DEC" ] | ||
40 | then | ||
41 | diff <(echo "$TEST_MSG" ) <(echo "$MSG_DEC") | ||
42 | echo "Failed - \"$TEST_MSG\" != \"$MSG_DEC\"" | ||
43 | exit 1 | ||
44 | fi | ||
45 | if [ "$TEST_MSG" != "$MSG_DEC_ED" ] | ||
46 | then | ||
47 | diff <(echo "$TEST_MSG" ) <(echo "$MSG_DEC_ED") | ||
48 | echo "Failed - \"$TEST_MSG\" != \"$MSG_DEC_ED\"" | ||
49 | exit 1 | ||
50 | fi | ||