mirror.dongdigua.github.io/gmi/docker/genkey.sh

13 lines
315 B
Bash
Raw Normal View History

2023-06-27 14:18:32 +08:00
#! /bin/sh
2023-06-27 13:47:08 +08:00
if test -f /etc/ssl/gmid.pem; then
echo "OK certificate exists"
else
echo "generating certificate..."
apk add libressl
libressl req -x509 -newkey rsa:4096 -nodes \
-keyout /etc/ssl/private/gmid.key \
-out /etc/ssl/gmid.pem \
-days 365 -subj "/CN=$GEMINI_HOST"
fi