#!/bin/bash
# Generate self-signed cert for c2.py TLS (lab use only).
# Output: cert.pem + key.pem next to c2.py
set -e
cd "$(dirname "$0")"
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem \
    -days 365 -nodes -subj "/CN=lab-c2" 2>/dev/null
echo "generated: $(ls -la cert.pem key.pem)"
echo "c2.py will auto-enable TLS on next start"
