tang: do not require bash and curl (backport from 23.05)

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
This commit is contained in:
Nikos Mavrogiannopoulos 2023-08-31 18:45:20 +02:00
parent 5918cb1143
commit c30b106576
2 changed files with 17 additions and 1 deletions

View File

@ -27,7 +27,7 @@ include $(INCLUDE_DIR)/meson.mk
define Package/tang
SECTION:=utils
TITLE:=tang v$(PKG_VERSION) - daemon for binding data to the presence of a third party
DEPENDS:=+libhttp-parser +jose +bash
DEPENDS:=+libhttp-parser +jose
URL:=https://github.com/latchset/tang
USERID:=tang:tang
endef

View File

@ -0,0 +1,16 @@
diff --git a/src/tang-show-keys b/src/tang-show-keys
index 0c33c3a..4b64bda 100755
--- a/src/tang-show-keys
+++ b/src/tang-show-keys
@@ -25,9 +25,9 @@ if [ $# -gt 1 ]; then
exit 1
fi
-port=${1-80}
+port=${1-9090}
-adv=$(curl -sSf "localhost:$port/adv")
+adv=$(wget -qO- "http://127.0.0.1:$port/adv")
THP_DEFAULT_HASH=S256 # SHA-256.
jose fmt --json "${adv}" -g payload -y -o- \