Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KqJyCidz3ZgRyHABv2GVJh
8 lines
405 B
Bash
Executable File
8 lines
405 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Self-signed certificate for localhost / 127.0.0.1, valid 30 days. Only the test server uses it.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."; mkdir -p certs
|
|
openssl req -x509 -newkey rsa:2048 -nodes -days 30 -keyout certs/key.pem -out certs/cert.pem \
|
|
-subj "/CN=localhost" -addext "subjectAltName=DNS:localhost,IP:127.0.0.1" 2>/dev/null
|
|
echo "wrote certs/cert.pem and certs/key.pem"
|