Skip to content

Commit 1788ca2

Browse files
committed
Try to make cert valid at an earlier date
1 parent 5951297 commit 1788ca2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ FROM alpine:3.21.3
33
RUN \
44
# Update and install system applications
55
apk add --update --no-cache \
6-
bind-tools=9.18.34-r0 \
6+
bind-tools=9.18.35-r0 \
77
certbot=3.0.1-r0 \
88
curl=8.12.1-r1 \
99
libcap=2.71-r0 \
10+
libfaketime=0.9.10-r3 \
1011
lua-resty-core=0.1.31-r0 \
1112
nginx=1.26.3-r0 \
1213
nginx-mod-http-fancyindex=1.26.3-r0 \

entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ for file in /etc/nginx/sites-available/*; do
233233
done
234234

235235
# Generate snakeoil certs for domains found in hijacked domains (Up to 8 sections for the domain)
236-
openssl req -nodes -x509 -newkey rsa:4096 -keyout /etc/nginx/certs/private/snakeoil.key -out /etc/nginx/certs/snakeoil.crt -days 36500 -subj '/CN=*/CN=*.*/CN=*.*.*/CN=*.*.*.*/CN=*.*.*.*.*/CN=*.*.*.*.*.*/CN=*.*.*.*.*.*.*/CN=*.*.*.*.*.*.*.*' > /dev/null 2>&1
236+
LD_PRELOAD=src/libfaketime.so.1 FAKETIME="@1970-01-01 00:00:00" openssl req -nodes -x509 -newkey rsa:4096 -keyout /etc/nginx/certs/private/snakeoil.key -out /etc/nginx/certs/snakeoil.crt -days 36500 -subj '/CN=*/CN=*.*/CN=*.*.*/CN=*.*.*.*/CN=*.*.*.*.*/CN=*.*.*.*.*.*/CN=*.*.*.*.*.*.*/CN=*.*.*.*.*.*.*.*' > /dev/null 2>&1
237237
chmod 644 /etc/nginx/certs/snakeoil.crt
238238
chmod 640 /etc/nginx/certs/private/snakeoil.key
239239

0 commit comments

Comments
 (0)