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

14 lines
329 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 /ssl/gmid.pem; then
2023-06-27 13:47:08 +08:00
echo "OK certificate exists"
else
echo "generating certificate..."
mkdir /ssl
apk add --no-cache libressl
2023-06-27 13:47:08 +08:00
libressl req -x509 -newkey rsa:4096 -nodes \
-keyout /ssl/private/gmid.key \
-out /ssl/gmid.pem \
2023-06-27 13:47:08 +08:00
-days 365 -subj "/CN=$GEMINI_HOST"
fi