blob: e699f07be812754b94dbd98891bf6e953644002f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#!/bin/sh
local='dummy@bitmask.net'
nobody_local='fooooooo@bitmask.net'
external='dummy@leap.se'
server='leech.bitmask.net'
# override $server with possible exported shell var
[ $SWAKS_SERVER ] && server=$SWAKS_SERVER
swaks_options="--timeout 5 --server $server --hide-informational --suppress-data"
swaks_auth="--tlsc --tls-cert $HOME/leap/test/certs/cert.crt --tls-key $HOME/leap/test/certs/cert.key"
echo "swaks_options: $swaks_options"
echo "swaks_auth : $swaks_auth"
test_swaks() {
from=$1
to=$2
echo -n "From $from, to $to, no authentication:"
swaks -f $from -t $to $swaks_options | tail -3 | head -1
echo -n "From $from, to $to, with authentication:"
swaks -f $from -t $to $swaks_options $swaks_auth | tail -3 | head -1
echo
}
test_swaks $local $local
test_swaks $local $nobody_local
test_swaks $local $external
echo
test_swaks $nobody_local $local
test_swaks $nobody_local $nobody_local
test_swaks $nobody_local $external
echo
test_swaks $external $local
test_swaks $external $nobody_local
test_swaks $external $external
|