graphene-os-server-infrastr.../nginx-rotate-session-ticket-keys
Daniel Micay 750cd5e985 replace urandom with random
These both use the same CSPRNG on modern kernels, but random waits for
CSPRNG initialization instead of only attempting to initialize it.
2024-06-17 15:04:13 -04:00

16 lines
244 B
Bash
Executable File

#!/bin/bash
set -o errexit -o nounset -o pipefail
umask 077
cd /etc/nginx/session-ticket-keys
rsync -I 2.key 1.key
rsync -I 3.key 2.key
rsync -I 4.key 3.key
head -c 80 </dev/random >new.key
rsync -I new.key 4.key
rm new.key
nginx -s reload