aboutsummaryrefslogtreecommitdiff
path: root/server/testdata/cmd/add-entry
diff options
context:
space:
mode:
Diffstat (limited to 'server/testdata/cmd/add-entry')
-rwxr-xr-xserver/testdata/cmd/add-entry36
1 files changed, 0 insertions, 36 deletions
diff --git a/server/testdata/cmd/add-entry b/server/testdata/cmd/add-entry
deleted file mode 100755
index 853dd97..0000000
--- a/server/testdata/cmd/add-entry
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/bash
-
-set -eo pipefail
-source config
-
-algo=ecdsa
-signature_scheme=1027
-key_path="../chain/rgdd-$algo.key"
-cert_path="../chain/rgdd-$algo.pem"
-name="foobar-1.2.3"
-
-if [[ ! -z $1 ]]; then
- name=$1
-fi
-info "package name: $name"
-
-pushd ../entry >/dev/null
- info "generating base64-encoded StItem and signature"
- go run . --dir stitem --name $name
- openssl dgst -sha256 -sign $key_path -out stitem/$name.sig stitem/$name
- openssl base64 -A -in stitem/$name -out stitem/$name.b64
- openssl base64 -A -in stitem/$name.sig -out stitem/$name.sig.b64
- json=$(printf '{"item":"%s","signature":"%s","signature_scheme":%s,"chain":["%s"]}'\
- $(cat stitem/$name.b64)\
- $(cat stitem/$name.sig.b64)\
- $signature_scheme\
- $(cat $cert_path |\
- sed '1,1d;$ d' |\
- xargs |\
- sed 's/ //g'))
- rm -f stitem/$name{,.sig,.b64,.sig.b64}
-popd >/dev/null
-
-info "sending add-entry request"
-curl --header "application/json" --request POST --data $json $base_url/add-entry
-newline