Annotate

spec/tls/config2/prepare.sh @ 13874:bfa8ac5881a0 default tip

mod_http_files: Fail if missing the required 'http_files_dir' setting
author Kim Alvefur <zash@zash.se>
date Tue, 13 May 2025 22:38:34 +0200
parent 13816:4122978f2575
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13816
4122978f2575 spec/tls: Add TLS/certificate integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
1 #!/bin/bash
4122978f2575 spec/tls: Add TLS/certificate integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
2
4122978f2575 spec/tls: Add TLS/certificate integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
3 certs="./certs"
4122978f2575 spec/tls: Add TLS/certificate integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
4
4122978f2575 spec/tls: Add TLS/certificate integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
5 for domain in {,xmpp.}example.com; do
4122978f2575 spec/tls: Add TLS/certificate integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
6 openssl req -x509 \
4122978f2575 spec/tls: Add TLS/certificate integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
7 -newkey rsa:4096 \
4122978f2575 spec/tls: Add TLS/certificate integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
8 -keyout "${certs}/${domain}.key" \
4122978f2575 spec/tls: Add TLS/certificate integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
9 -out "${certs}/${domain}.crt" \
4122978f2575 spec/tls: Add TLS/certificate integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
10 -sha256 \
4122978f2575 spec/tls: Add TLS/certificate integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
11 -days 365 \
4122978f2575 spec/tls: Add TLS/certificate integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
12 -nodes \
4122978f2575 spec/tls: Add TLS/certificate integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
13 -subj "/CN=${domain}" 2>/dev/null;
4122978f2575 spec/tls: Add TLS/certificate integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
14 done