2015-07-14 12:38:43 +02:00
|
|
|
#! /bin/bash
|
|
|
|
|
2016-05-24 15:45:32 +02:00
|
|
|
cd `dirname $0`
|
|
|
|
|
2016-05-10 10:14:29 +02:00
|
|
|
OLM="python -m olm"
|
2015-07-14 12:38:43 +02:00
|
|
|
|
|
|
|
ALICE_ACCOUNT=alice.account
|
|
|
|
ALICE_SESSION=alice.session
|
|
|
|
BOB_ACCOUNT=bob.account
|
|
|
|
BOB_SESSION=bob.session
|
|
|
|
|
|
|
|
rm $ALICE_ACCOUNT $BOB_ACCOUNT
|
|
|
|
rm $ALICE_SESSION $BOB_SESSION
|
|
|
|
|
|
|
|
$OLM create_account $ALICE_ACCOUNT
|
|
|
|
$OLM create_account $BOB_ACCOUNT
|
|
|
|
$OLM generate_keys $BOB_ACCOUNT 1
|
|
|
|
|
2016-05-24 17:50:26 +02:00
|
|
|
BOB_IDENTITY_KEY="$($OLM identity_key $BOB_ACCOUNT)"
|
|
|
|
BOB_ONE_TIME_KEY="$($OLM one_time_key $BOB_ACCOUNT)"
|
2015-07-14 12:38:43 +02:00
|
|
|
|
|
|
|
$OLM outbound $ALICE_ACCOUNT $ALICE_SESSION "$BOB_IDENTITY_KEY" "$BOB_ONE_TIME_KEY"
|
|
|
|
|
|
|
|
echo "Hello world" | $OLM encrypt $ALICE_SESSION - - | $OLM inbound $BOB_ACCOUNT $BOB_SESSION - -
|