aboutsummaryrefslogtreecommitdiff
path: root/python/test_olm.sh
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2017-04-24 13:11:41 +0100
committerRichard van der Hoff <richard@matrix.org>2017-04-24 13:14:36 +0100
commitf8c61b8f8432d0b0b38d57f513c5048fb42f22ab (patch)
treeff1cd60946df13872091b3a03ae968955e40a0af /python/test_olm.sh
parent853ea8fbc7b393455c69de1ce95011117f1423fe (diff)
Python: Make ed25519_verify take some arguments
It's not much use if everything is hardcoded.
Diffstat (limited to 'python/test_olm.sh')
-rwxr-xr-xpython/test_olm.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/python/test_olm.sh b/python/test_olm.sh
index 6ba92b6..1554720 100755
--- a/python/test_olm.sh
+++ b/python/test_olm.sh
@@ -1,5 +1,7 @@
#! /bin/bash
+set -e
+
cd `dirname $0`
OLM="python -m olm"
@@ -38,6 +40,7 @@ $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
-### Utility
-
-$OLM ed25519_verify
+### Sign/verify
+ALICE_SIGNING_KEY="$($OLM signing_key $ALICE_ACCOUNT)"
+sig="$(echo "Test message" | $OLM sign $ALICE_ACCOUNT - -)"
+echo "Test message" | $OLM ed25519_verify $ALICE_SIGNING_KEY $sig -