Merge pull request #2429 from thaJeztah/add_fixture_gen_script

Add script to regenerate test-certificate fixtures
This commit is contained in:
Sebastiaan van Stijn 2020-04-21 16:50:09 +02:00 committed by GitHub
commit e28d9c49ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 0 deletions

12
e2e/testdata/gen-certs.sh vendored Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env sh
set -eu
# This script is used to generate the test-certificates in the notary-server and
# evil-notary-server directories. Run this script to update the certificates if
# they expire.
GO111MODULE=off go get -u github.com/dmcgowan/quicktls
cd notary
quicktls -org=Docker -with-san notary-server notaryserver evil-notary-server evilnotaryserver localhost 127.0.0.1
cat ca.pem >> notary-server.cert
mv ca.pem root-ca.cert
cp notary-server.cert notary-server.key root-ca.cert ../notary-evil/