aboutsummaryrefslogtreecommitdiff
path: root/python/test_olm.sh
diff options
context:
space:
mode:
authorRichard van der Hoff <github@rvanderhoff.org.uk>2017-01-10 15:39:42 +0000
committerGitHub <noreply@github.com>2017-01-10 15:39:42 +0000
commit860740a91ee0efcf3c594ece23ef0a38ddda394e (patch)
tree32bc83b640221ff5c983b92fb3a90c6d73d7c85d /python/test_olm.sh
parent14c30da0e2bdff675c8af97e3c6ee49fba82af8d (diff)
parentc04b770cd3c96aa3a55ff3b6d817ba5b6f6f6922 (diff)
Merge pull request #42 from matrix-org/rav/megolm_export
Export and import of megolm session data
Diffstat (limited to 'python/test_olm.sh')
-rwxr-xr-xpython/test_olm.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/python/test_olm.sh b/python/test_olm.sh
index 989e166..7c90daf 100755
--- a/python/test_olm.sh
+++ b/python/test_olm.sh
@@ -10,10 +10,11 @@ ALICE_GROUP_SESSION=alice.group_session
BOB_ACCOUNT=bob.account
BOB_SESSION=bob.session
BOB_GROUP_SESSION=bob.group_session
+CHARLIE_GROUP_SESSION=charlie.group_session
-rm $ALICE_ACCOUNT $BOB_ACCOUNT
-rm $ALICE_SESSION $BOB_SESSION
-rm $ALICE_GROUP_SESSION $BOB_GROUP_SESSION
+rm -f $ALICE_ACCOUNT $BOB_ACCOUNT
+rm -f $ALICE_SESSION $BOB_SESSION
+rm -f $ALICE_GROUP_SESSION $BOB_GROUP_SESSION $CHARLIE_GROUP_SESSION
$OLM create_account $ALICE_ACCOUNT
$OLM create_account $BOB_ACCOUNT
@@ -31,4 +32,8 @@ echo "Hello world" | $OLM encrypt $ALICE_SESSION - - | $OLM inbound $BOB_ACCOUNT
$OLM outbound_group $ALICE_GROUP_SESSION
$OLM group_credentials $ALICE_GROUP_SESSION | $OLM inbound_group $BOB_GROUP_SESSION
-echo "Hello group" | $OLM group_encrypt $ALICE_GROUP_SESSION - - | $OLM group_decrypt $BOB_GROUP_SESSION
+echo "Hello group" | $OLM group_encrypt $ALICE_GROUP_SESSION - group_message
+$OLM group_decrypt $BOB_GROUP_SESSION group_message
+
+$OLM export_inbound_group $BOB_GROUP_SESSION | $OLM import_inbound_group $CHARLIE_GROUP_SESSION
+$OLM group_decrypt $CHARLIE_GROUP_SESSION group_message