Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
matrix-org
Olm
Commits
36d17d1c
Commit
36d17d1c
authored
Jul 14, 2015
by
Mark Haines
Browse files
Move olm.py to a python subdirectory. Add a script for testing the olm.py script
parent
a59fbdfe
Changes
2
Hide whitespace changes
Inline
Side-by-side
olm.py
→
python/
olm.py
View file @
36d17d1c
...
...
@@ -4,7 +4,7 @@ import json
import
os
lib
=
cdll
.
LoadLibrary
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"build"
,
"libolm.so"
)
os
.
path
.
dirname
(
__file__
),
".."
,
"build"
,
"libolm.so"
)
)
...
...
python/test_olm.sh
0 → 100755
View file @
36d17d1c
#! /bin/bash
OLM
=
"
$(
dirname
$0
)
/olm.py"
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
BOB_IDENTITY_KEY
=
"
$(
$OLM
keys
--json
$BOB_ACCOUNT
| jq
-r
.account_keys.curve25519
)
"
BOB_ONE_TIME_KEY
=
"
$(
$OLM
keys
--json
$BOB_ACCOUNT
| jq
-r
'.one_time_keys.curve25519|to_entries[0].value'
)
"
$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
- -
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment