-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_ws.sh
executable file
·22 lines (16 loc) · 975 Bytes
/
test_ws.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# To test the esealing-ws if it's running on localhost:8080
export HOST=${HOST:-localhost}
export PORT=${PORT:-8080}
export USERNAME=${USERNAME:-selor}
export PASS=${PASS:-test123}
export PROTO=${PROTO:-http}
export HOST=esealing.local.test.belgium.be
export PORT=443
export PROTO=https
printf "==== List request ====\n"
curl -k -X POST --user $USERNAME:$PASS -H "Content-type: application/json; charset=UTF-8" --data-binary @esealing-ws/samples/listreq.json $PROTO://$HOST:$PORT/esealing/credentials/list
printf "\n\n==== Info request ====\n"
curl -k -X POST --user $USERNAME:$PASS -H "Content-type: application/json; charset=UTF-8" --data-binary @esealing-ws/samples/inforeq.json $PROTO://$HOST:$PORT/esealing/credentials/info
printf "\n\n==== Sign request ====\n"
curl -k -X POST --user $USERNAME:$PASS -H "Content-type: application/json; charset=UTF-8" --data-binary @esealing-ws/samples/signreq.json $PROTO://$HOST:$PORT/esealing/signatures/signHash
printf "\n\n"