diff --git a/test/fixtures/keys/selfsigned-no-keycertsign/.gitignore b/test/fixtures/keys/selfsigned-no-keycertsign/.gitignore new file mode 100644 index 00000000000000..818cfbe2fdb895 --- /dev/null +++ b/test/fixtures/keys/selfsigned-no-keycertsign/.gitignore @@ -0,0 +1 @@ +csr.pem diff --git a/test/fixtures/keys/selfsigned-no-keycertsign/cert.pem b/test/fixtures/keys/selfsigned-no-keycertsign/cert.pem index c0829b82caf8d3..eb744150f995e8 100644 --- a/test/fixtures/keys/selfsigned-no-keycertsign/cert.pem +++ b/test/fixtures/keys/selfsigned-no-keycertsign/cert.pem @@ -1,18 +1,19 @@ -----BEGIN CERTIFICATE----- -MIIC9jCCAd6gAwIBAgIJANHflGRpZM1IMA0GCSqGSIb3DQEBCwUAMBQxEjAQBgNV -BAMMCWxvY2FsaG9zdDAeFw0yMTAzMTUwOTEzMjdaFw0yMjAzMTUwOTEzMjdaMBQx -EjAQBgNVBAMMCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC -ggEBANMt6TLw9gIxucRgZBn8owavEIMAddxMTjkHiR7jGfaBrvvVTB8ymsIizw/Q -KTANmu2r3EOqeR9Ht25KZFKxOKCDMd3aKHht38HInXIF6CQe8c5P0xsVKZAWkell -8ohL05EsFpcrJODIdHfaovODrtX8w1WexqDsUoPQdEk7pISJ2HhmXzpf7QmV00Ux -8J+64v2pTg8/C9VgpSgxE4oXlfJEqdSIAzGDT+VX96GWXTh7QqLjiQ9T96QHUJEn -Bx0Sr4rO9mY2lOQG408QuCLR/ng2J+lYx+03SC8Lq7lrtt4M06Ffr8TQRgpDAjkU -0YitbuysD5XgtCeFq0Fi3v1z700CAwEAAaNLMEkwCwYDVR0PBAQDAgWgMBMGA1Ud -JQQMMAoGCCsGAQUFBwMBMCUGA1UdEQQeMByCCTEyNy4wLjAuMYIJbG9jYWxob3N0 -hwR/AAABMA0GCSqGSIb3DQEBCwUAA4IBAQDAUCt/8Le2EO0ONOkQYUcPm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+UxhK2m+QSh2HrBN2ROKpziU2VlmoPLrrVuA +CPvFWwWuA3+OJlcQzkKxbje4S3cZ6tEzloYFvE9aXbiGnxMhzgA94F6JbJzIEX9g +ibxG6HueDTxV6LjsjQUQZApEp1yPDObdLYjOPzgRTWHJHhyaEDucT5IBdWAxA0f7 +kqEQQFuHIXoH9d4Sl1GSnUEural5lHKBrVgVywLDdayrCDhSDJAlchG7gtbYDCne +BNw+Z51nBu+3SJtGpwK0QyLCuqRouIC1c+urUFnXooRfpjcnmoW9XumqKV0PBi8e +uhHh3CM= -----END CERTIFICATE----- diff --git a/test/fixtures/keys/selfsigned-no-keycertsign/https_renew_cert.sh b/test/fixtures/keys/selfsigned-no-keycertsign/https_renew_cert.sh old mode 100644 new mode 100755 index 092f27a8867cbb..23cbfe9b253101 --- a/test/fixtures/keys/selfsigned-no-keycertsign/https_renew_cert.sh +++ b/test/fixtures/keys/selfsigned-no-keycertsign/https_renew_cert.sh @@ -1,6 +1,12 @@ -#!/bin/bash -openssl genrsa -out rsa.pem 2048 -openssl rsa -in rsa.pem -out key.pem -openssl req -sha256 -new -key key.pem -out csr.pem -subj "/CN=localhost" -openssl x509 -req -extfile cert.conf -extensions v3_req -days 365 -in csr.pem -signkey key.pem -out cert.pem +#!/usr/bin/env bash +set -euo pipefail +shopt -s inherit_errexit + +cd -- "$(dirname -- "${BASH_SOURCE[0]}")" +if [ ! -f key.pem ]; then + openssl genrsa -out key.pem 2048 +fi +openssl req -sha256 -new -key key.pem -out csr.pem -subj "/CN=localhost" +openssl x509 -req -extfile cert.conf -extensions v3_req -days 3650 -in csr.pem -signkey key.pem -out cert.pem +openssl x509 -in cert.pem -noout -text