/
githubmirror
/
clevis
Обзор
Документация
Войти
/
githubmirror
/
clevis
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v2
tests/pin-http
28 строк
448 B
Nathaniel McCallum
Remove relative paths
17 ноя 2016, 02:08
17 ноя 2016, 02:08
e427603
Код
Авторство
О чём код?
#!/bin/sh -x trap 'exit' ERR PORT=`shuf -i 1024-65535 -n 1` ./pin-httpd $PORT & export PID=$! sleep 0.25 function onerr() { kill -9 $PID ! wait $PID exit 1 } trap 'onerr' ERR e=`echo hi | ${top_builddir:-.}/clevis encrypt http "{\"url\": \"http://localhost:${PORT}/foo\"}"` d=`echo $e | ${top_builddir:-.}/clevis decrypt` test "$d" == "hi" kill -9 $PID ! wait $PID trap 'exit' ERR ! echo $e | ${top_builddir:-.}/clevis decrypt