summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2024-11-03 17:30:06 +0100
committerErich Eckner <git@eckner.net>2024-11-03 17:30:06 +0100
commit87f8f39e1e4bf43b2e45ca54ff180041d54fba5b (patch)
tree25e33a16043ec3d30ad91b2e37e63dd503c43714
parent8286d3499c81f74093575e0b8b98b43f2e96f000 (diff)
downloadykverify-87f8f39e1e4bf43b2e45ca54ff180041d54fba5b.tar.xz
save shared_secret
-rw-r--r--.gitignore1
-rwxr-xr-xinit7
2 files changed, 7 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..8b02695
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.shared_secret
diff --git a/init b/init
index c936133..091fa60 100755
--- a/init
+++ b/init
@@ -1,3 +1,8 @@
#!/bin/bash
-ykpersonalize -2 -ochal-resp -ochal-hmac -ohmac-lt64 -oserial-api-visible
+cd "$(dirname "$(readlink -e "$0")")"
+
+echo y \
+| ykpersonalize -2 -ochal-resp -ochal-hmac -ohmac-lt64 -oserial-api-visible 2>&1 \
+| sed 's@^key: h:@@;t;d' \
+> .shared_secret