diff options
Diffstat (limited to 'tests/dcaegen2/testcases/resources/gen-certs.sh')
-rwxr-xr-x | tests/dcaegen2/testcases/resources/gen-certs.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/dcaegen2/testcases/resources/gen-certs.sh b/tests/dcaegen2/testcases/resources/gen-certs.sh new file mode 100755 index 00000000..f3f358f9 --- /dev/null +++ b/tests/dcaegen2/testcases/resources/gen-certs.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +WS=$1 +dir=$WS/tests/dcaegen2/testcases/assets/certs + +openssl genrsa -out "$dir/temporary.key" 2048 + +openssl req -new -key "$dir/temporary.key" -subj "/C=PL/ST=DL/O=Nokia/CN=dcaegen2" -out "$dir/temporary.csr" + +openssl x509 -req -in "$dir/temporary.csr" -CA "$dir/rootCA.crt" -CAkey "$dir/rootCA.key" -passin pass:collector -CAcreateserial -out "$dir/temporary.crt" -days 1 -sha256 |